From b6de93e603915b57a1eccadc8bd530efd00d28f2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 10 Aug 2020 07:50:55 +0200 Subject: pkg/compiler: merge const files into a single file We now have 8 arches for Linux and .const files produce lots of noise in PRs and lots of diffs. If 3 .txt files are touched, the PR will have 24 .const files, which will be intermixed with .txt files. Frequently const values are equal across arches, and even if they don't spreading a single value across 8 files is inconvinient. Merge all 8 *_arch.const files into a single .const file. See the test for details of the new format. The old format is still parsed for now, we can't update all OSes at once. For Linux this reduces number of const files/lines from 1288/96599 to 158/11603. Fixes #1983 --- sys/test/test.txt.const | 6 ++++++ sys/test/test_32_fork_shmem.const | 4 ---- sys/test/test_32_shmem.const | 4 ---- sys/test/test_64.const | 4 ---- sys/test/test_64_fork.const | 3 --- 5 files changed, 6 insertions(+), 15 deletions(-) create mode 100644 sys/test/test.txt.const delete mode 100644 sys/test/test_32_fork_shmem.const delete mode 100644 sys/test/test_32_shmem.const delete mode 100644 sys/test/test_64.const delete mode 100644 sys/test/test_64_fork.const (limited to 'sys/test') diff --git a/sys/test/test.txt.const b/sys/test/test.txt.const new file mode 100644 index 000000000..11f548df0 --- /dev/null +++ b/sys/test/test.txt.const @@ -0,0 +1,6 @@ +arches = 32_fork_shmem, 32_shmem, 64, 64_fork +IPPROTO_ICMPV6 = 58 +IPPROTO_TCP = 6 +IPPROTO_UDP = 17 +ONLY_32BITS_CONST = 32_fork_shmem:1, 32_shmem:1 +ARCH_64_SPECIFIC_CONST = 64:10 diff --git a/sys/test/test_32_fork_shmem.const b/sys/test/test_32_fork_shmem.const deleted file mode 100644 index 938b68f89..000000000 --- a/sys/test/test_32_fork_shmem.const +++ /dev/null @@ -1,4 +0,0 @@ -IPPROTO_ICMPV6 = 58 -IPPROTO_TCP = 6 -IPPROTO_UDP = 17 -ONLY_32BITS_CONST = 1 diff --git a/sys/test/test_32_shmem.const b/sys/test/test_32_shmem.const deleted file mode 100644 index 938b68f89..000000000 --- a/sys/test/test_32_shmem.const +++ /dev/null @@ -1,4 +0,0 @@ -IPPROTO_ICMPV6 = 58 -IPPROTO_TCP = 6 -IPPROTO_UDP = 17 -ONLY_32BITS_CONST = 1 diff --git a/sys/test/test_64.const b/sys/test/test_64.const deleted file mode 100644 index 8b4c45cca..000000000 --- a/sys/test/test_64.const +++ /dev/null @@ -1,4 +0,0 @@ -IPPROTO_ICMPV6 = 58 -IPPROTO_TCP = 6 -IPPROTO_UDP = 17 -ARCH_64_SPECIFIC_CONST = 10 diff --git a/sys/test/test_64_fork.const b/sys/test/test_64_fork.const deleted file mode 100644 index 30db9e24f..000000000 --- a/sys/test/test_64_fork.const +++ /dev/null @@ -1,3 +0,0 @@ -IPPROTO_ICMPV6 = 58 -IPPROTO_TCP = 6 -IPPROTO_UDP = 17 -- cgit mrf-deployment