diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-19 11:12:28 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-20 07:27:37 +0100 |
commit | d284b82b3edcfa610c72e66444ff969396be1e3b (patch) | |
tree | 4ce3640f82d04ba57b84c849425979b1f6149617 /src | |
parent | Merge pull request #10847 from evverx/journald-stream-fuzzer (diff) | |
download | systemd-d284b82b3edcfa610c72e66444ff969396be1e3b.tar.xz systemd-d284b82b3edcfa610c72e66444ff969396be1e3b.zip |
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/meson.build | 46 | ||||
-rw-r--r-- | src/shared/barrier.c (renamed from src/basic/barrier.c) | 0 | ||||
-rw-r--r-- | src/shared/barrier.h (renamed from src/basic/barrier.h) | 0 | ||||
-rw-r--r-- | src/shared/bitmap.c (renamed from src/basic/bitmap.c) | 0 | ||||
-rw-r--r-- | src/shared/bitmap.h (renamed from src/basic/bitmap.h) | 0 | ||||
-rw-r--r-- | src/shared/blkid-util.h (renamed from src/basic/blkid-util.h) | 0 | ||||
-rw-r--r-- | src/shared/bpf-program.c (renamed from src/basic/bpf-program.c) | 0 | ||||
-rw-r--r-- | src/shared/bpf-program.h (renamed from src/basic/bpf-program.h) | 0 | ||||
-rw-r--r-- | src/shared/calendarspec.c (renamed from src/basic/calendarspec.c) | 0 | ||||
-rw-r--r-- | src/shared/calendarspec.h (renamed from src/basic/calendarspec.h) | 0 | ||||
-rw-r--r-- | src/shared/clock-util.c (renamed from src/basic/clock-util.c) | 0 | ||||
-rw-r--r-- | src/shared/clock-util.h (renamed from src/basic/clock-util.h) | 0 | ||||
-rw-r--r-- | src/shared/cpu-set-util.c (renamed from src/basic/cpu-set-util.c) | 0 | ||||
-rw-r--r-- | src/shared/cpu-set-util.h (renamed from src/basic/cpu-set-util.h) | 0 | ||||
-rw-r--r-- | src/shared/crypt-util.c (renamed from src/basic/crypt-util.c) | 0 | ||||
-rw-r--r-- | src/shared/crypt-util.h (renamed from src/basic/crypt-util.h) | 0 | ||||
-rw-r--r-- | src/shared/exec-util.c (renamed from src/basic/exec-util.c) | 0 | ||||
-rw-r--r-- | src/shared/exec-util.h (renamed from src/basic/exec-util.h) | 0 | ||||
-rw-r--r-- | src/shared/exit-status.c (renamed from src/basic/exit-status.c) | 0 | ||||
-rw-r--r-- | src/shared/exit-status.h (renamed from src/basic/exit-status.h) | 0 | ||||
-rw-r--r-- | src/shared/fileio-label.c (renamed from src/basic/fileio-label.c) | 0 | ||||
-rw-r--r-- | src/shared/fileio-label.h (renamed from src/basic/fileio-label.h) | 0 | ||||
-rw-r--r-- | src/shared/format-table.c (renamed from src/basic/format-table.c) | 0 | ||||
-rw-r--r-- | src/shared/format-table.h (renamed from src/basic/format-table.h) | 0 | ||||
-rw-r--r-- | src/shared/journal-importer.c (renamed from src/basic/journal-importer.c) | 0 | ||||
-rw-r--r-- | src/shared/journal-importer.h (renamed from src/basic/journal-importer.h) | 0 | ||||
-rw-r--r-- | src/shared/json-internal.h (renamed from src/basic/json-internal.h) | 0 | ||||
-rw-r--r-- | src/shared/json.c (renamed from src/basic/json.c) | 0 | ||||
-rw-r--r-- | src/shared/json.h (renamed from src/basic/json.h) | 0 | ||||
-rw-r--r-- | src/shared/lockfile-util.c (renamed from src/basic/lockfile-util.c) | 0 | ||||
-rw-r--r-- | src/shared/lockfile-util.h (renamed from src/basic/lockfile-util.h) | 0 | ||||
-rw-r--r-- | src/shared/meson.build | 46 | ||||
-rw-r--r-- | src/shared/os-util.c (renamed from src/basic/os-util.c) | 0 | ||||
-rw-r--r-- | src/shared/os-util.h (renamed from src/basic/os-util.h) | 0 | ||||
-rw-r--r-- | src/shared/reboot-util.c (renamed from src/basic/reboot-util.c) | 0 | ||||
-rw-r--r-- | src/shared/reboot-util.h (renamed from src/basic/reboot-util.h) | 0 | ||||
-rw-r--r-- | src/shared/rlimit-util.c (renamed from src/basic/rlimit-util.c) | 0 | ||||
-rw-r--r-- | src/shared/rlimit-util.h (renamed from src/basic/rlimit-util.h) | 0 | ||||
-rw-r--r-- | src/shared/securebits-util.c (renamed from src/basic/securebits-util.c) | 0 | ||||
-rw-r--r-- | src/shared/securebits-util.h (renamed from src/basic/securebits-util.h) | 0 | ||||
-rw-r--r-- | src/shared/socket-protocol-list.c (renamed from src/basic/socket-protocol-list.c) | 0 | ||||
-rw-r--r-- | src/shared/socket-protocol-list.h (renamed from src/basic/socket-protocol-list.h) | 0 | ||||
-rw-r--r-- | src/shared/verbs.c (renamed from src/basic/verbs.c) | 0 | ||||
-rw-r--r-- | src/shared/verbs.h (renamed from src/basic/verbs.h) | 0 | ||||
-rw-r--r-- | src/shared/web-util.c (renamed from src/basic/web-util.c) | 0 | ||||
-rw-r--r-- | src/shared/web-util.h (renamed from src/basic/web-util.h) | 0 | ||||
-rw-r--r-- | src/shared/xml.c (renamed from src/basic/xml.c) | 0 | ||||
-rw-r--r-- | src/shared/xml.h (renamed from src/basic/xml.h) | 0 |
48 files changed, 46 insertions, 46 deletions
diff --git a/src/basic/meson.build b/src/basic/meson.build index 3e2325f41f..3b3187de83 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -15,23 +15,14 @@ basic_sources = files(''' async.h audit-util.c audit-util.h - barrier.c - barrier.h - bitmap.c - bitmap.h - blkid-util.h blockdev-util.c blockdev-util.h - bpf-program.c - bpf-program.h btrfs-ctree.h btrfs-util.c btrfs-util.h build.h bus-label.c bus-label.h - calendarspec.c - calendarspec.h cap-list.c cap-list.h capability-util.c @@ -40,16 +31,10 @@ basic_sources = files(''' cgroup-util.h chattr-util.c chattr-util.h - clock-util.c - clock-util.h conf-files.c conf-files.h copy.c copy.h - cpu-set-util.c - cpu-set-util.h - crypt-util.c - crypt-util.h def.h device-nodes.c device-nodes.h @@ -63,20 +48,12 @@ basic_sources = files(''' escape.h ether-addr-util.c ether-addr-util.h - exec-util.c - exec-util.h - exit-status.c - exit-status.h extract-word.c extract-word.h fd-util.c fd-util.h - fileio-label.c - fileio-label.h fileio.c fileio.h - format-table.c - format-table.h format-util.h fs-util.c fs-util.h @@ -97,11 +74,6 @@ basic_sources = files(''' io-util.c io-util.h ioprio.h - journal-importer.c - journal-importer.h - json-internal.h - json.c - json.h khash.c khash.h label.c @@ -109,8 +81,6 @@ basic_sources = files(''' list.h locale-util.c locale-util.h - lockfile-util.c - lockfile-util.h log.c log.h login-util.c @@ -129,8 +99,6 @@ basic_sources = files(''' nss-util.h ordered-set.c ordered-set.h - os-util.c - os-util.h pager.c pager.h parse-util.c @@ -151,17 +119,11 @@ basic_sources = files(''' ratelimit.h raw-clone.h raw-reboot.h - reboot-util.c - reboot-util.h refcnt.h replace-var.c replace-var.h - rlimit-util.c - rlimit-util.h rm-rf.c rm-rf.h - securebits-util.c - securebits-util.h securebits.h selinux-util.c selinux-util.h @@ -175,8 +137,6 @@ basic_sources = files(''' smack-util.c smack-util.h socket-label.c - socket-protocol-list.c - socket-protocol-list.h socket-util.c socket-util.h sparse-endian.h @@ -213,16 +173,10 @@ basic_sources = files(''' utf8.h util.c util.h - verbs.c - verbs.h virt.c virt.h - web-util.c - web-util.h xattr-util.c xattr-util.h - xml.c - xml.h '''.split()) missing_h = files('missing.h') diff --git a/src/basic/barrier.c b/src/shared/barrier.c index 79316dd4c2..79316dd4c2 100644 --- a/src/basic/barrier.c +++ b/src/shared/barrier.c diff --git a/src/basic/barrier.h b/src/shared/barrier.h index 0eb3d2792e..0eb3d2792e 100644 --- a/src/basic/barrier.h +++ b/src/shared/barrier.h diff --git a/src/basic/bitmap.c b/src/shared/bitmap.c index a4cd6451b0..a4cd6451b0 100644 --- a/src/basic/bitmap.c +++ b/src/shared/bitmap.c diff --git a/src/basic/bitmap.h b/src/shared/bitmap.h index 843d27d24d..843d27d24d 100644 --- a/src/basic/bitmap.h +++ b/src/shared/bitmap.h diff --git a/src/basic/blkid-util.h b/src/shared/blkid-util.h index e4eb600ed6..e4eb600ed6 100644 --- a/src/basic/blkid-util.h +++ b/src/shared/blkid-util.h diff --git a/src/basic/bpf-program.c b/src/shared/bpf-program.c index 2c61e04132..2c61e04132 100644 --- a/src/basic/bpf-program.c +++ b/src/shared/bpf-program.c diff --git a/src/basic/bpf-program.h b/src/shared/bpf-program.h index c21eb2f72a..c21eb2f72a 100644 --- a/src/basic/bpf-program.h +++ b/src/shared/bpf-program.h diff --git a/src/basic/calendarspec.c b/src/shared/calendarspec.c index dafc09e8f8..dafc09e8f8 100644 --- a/src/basic/calendarspec.c +++ b/src/shared/calendarspec.c diff --git a/src/basic/calendarspec.h b/src/shared/calendarspec.h index 3bf8a39e1a..3bf8a39e1a 100644 --- a/src/basic/calendarspec.h +++ b/src/shared/calendarspec.h diff --git a/src/basic/clock-util.c b/src/shared/clock-util.c index 1877a81434..1877a81434 100644 --- a/src/basic/clock-util.c +++ b/src/shared/clock-util.c diff --git a/src/basic/clock-util.h b/src/shared/clock-util.h index b9db54eac9..b9db54eac9 100644 --- a/src/basic/clock-util.h +++ b/src/shared/clock-util.h diff --git a/src/basic/cpu-set-util.c b/src/shared/cpu-set-util.c index 9a789ae756..9a789ae756 100644 --- a/src/basic/cpu-set-util.c +++ b/src/shared/cpu-set-util.c diff --git a/src/basic/cpu-set-util.h b/src/shared/cpu-set-util.h index 1b6bd35b1c..1b6bd35b1c 100644 --- a/src/basic/cpu-set-util.h +++ b/src/shared/cpu-set-util.h diff --git a/src/basic/crypt-util.c b/src/shared/crypt-util.c index 20bdc5489e..20bdc5489e 100644 --- a/src/basic/crypt-util.c +++ b/src/shared/crypt-util.c diff --git a/src/basic/crypt-util.h b/src/shared/crypt-util.h index 8c86714aec..8c86714aec 100644 --- a/src/basic/crypt-util.h +++ b/src/shared/crypt-util.h diff --git a/src/basic/exec-util.c b/src/shared/exec-util.c index 10d774dfcd..10d774dfcd 100644 --- a/src/basic/exec-util.c +++ b/src/shared/exec-util.c diff --git a/src/basic/exec-util.h b/src/shared/exec-util.h index 6ac3c9000a..6ac3c9000a 100644 --- a/src/basic/exec-util.h +++ b/src/shared/exec-util.h diff --git a/src/basic/exit-status.c b/src/shared/exit-status.c index 21af8c4c71..21af8c4c71 100644 --- a/src/basic/exit-status.c +++ b/src/shared/exit-status.c diff --git a/src/basic/exit-status.h b/src/shared/exit-status.h index c41e8b82c3..c41e8b82c3 100644 --- a/src/basic/exit-status.h +++ b/src/shared/exit-status.h diff --git a/src/basic/fileio-label.c b/src/shared/fileio-label.c index b5362b5cbc..b5362b5cbc 100644 --- a/src/basic/fileio-label.c +++ b/src/shared/fileio-label.c diff --git a/src/basic/fileio-label.h b/src/shared/fileio-label.h index d11112debd..d11112debd 100644 --- a/src/basic/fileio-label.h +++ b/src/shared/fileio-label.h diff --git a/src/basic/format-table.c b/src/shared/format-table.c index 10e15c9d70..10e15c9d70 100644 --- a/src/basic/format-table.c +++ b/src/shared/format-table.c diff --git a/src/basic/format-table.h b/src/shared/format-table.h index 6dc2d16052..6dc2d16052 100644 --- a/src/basic/format-table.h +++ b/src/shared/format-table.h diff --git a/src/basic/journal-importer.c b/src/shared/journal-importer.c index ca203bbbfc..ca203bbbfc 100644 --- a/src/basic/journal-importer.c +++ b/src/shared/journal-importer.c diff --git a/src/basic/journal-importer.h b/src/shared/journal-importer.h index 53354b7c78..53354b7c78 100644 --- a/src/basic/journal-importer.h +++ b/src/shared/journal-importer.h diff --git a/src/basic/json-internal.h b/src/shared/json-internal.h index bf158bff0d..bf158bff0d 100644 --- a/src/basic/json-internal.h +++ b/src/shared/json-internal.h diff --git a/src/basic/json.c b/src/shared/json.c index eec6ea7baf..eec6ea7baf 100644 --- a/src/basic/json.c +++ b/src/shared/json.c diff --git a/src/basic/json.h b/src/shared/json.h index c9482d23eb..c9482d23eb 100644 --- a/src/basic/json.h +++ b/src/shared/json.h diff --git a/src/basic/lockfile-util.c b/src/shared/lockfile-util.c index 4bae23b243..4bae23b243 100644 --- a/src/basic/lockfile-util.c +++ b/src/shared/lockfile-util.c diff --git a/src/basic/lockfile-util.h b/src/shared/lockfile-util.h index c2abd9956f..c2abd9956f 100644 --- a/src/basic/lockfile-util.h +++ b/src/shared/lockfile-util.h diff --git a/src/shared/meson.build b/src/shared/meson.build index c692f012b1..f7f63a5404 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -8,24 +8,39 @@ shared_sources = files(''' apparmor-util.h ask-password-api.c ask-password-api.h + barrier.c + barrier.h base-filesystem.c base-filesystem.h + bitmap.c + bitmap.h + blkid-util.h boot-timestamps.c boot-timestamps.h bootspec.c bootspec.h + bpf-program.c + bpf-program.h bus-unit-util.c bus-unit-util.h bus-util.c bus-util.h + calendarspec.c + calendarspec.h cgroup-show.c cgroup-show.h clean-ipc.c clean-ipc.h + clock-util.c + clock-util.h condition.c condition.h conf-parser.c conf-parser.h + cpu-set-util.c + cpu-set-util.h + crypt-util.c + crypt-util.h dev-setup.c dev-setup.h dissect-image.c @@ -37,9 +52,17 @@ shared_sources = files(''' efivars.c efivars.h enable-mempool.c + exec-util.c + exec-util.h + exit-status.c + exit-status.h fdset.c fdset.h + fileio-label.c + fileio-label.h firewall-util.h + format-table.c + format-table.h fstab-util.c fstab-util.h generator.c @@ -56,8 +79,15 @@ shared_sources = files(''' install-printf.h install.c install.h + journal-importer.c + journal-importer.h journal-util.c journal-util.h + json-internal.h + json.c + json.h + lockfile-util.c + lockfile-util.h logs-show.c logs-show.h loop-util.c @@ -69,19 +99,29 @@ shared_sources = files(''' module-util.h nsflags.c nsflags.h + os-util.c + os-util.h output-mode.c output-mode.h path-lookup.c path-lookup.h ptyfwd.c ptyfwd.h + reboot-util.c + reboot-util.h resolve-util.c resolve-util.h + rlimit-util.c + rlimit-util.h seccomp-util.h + securebits-util.c + securebits-util.h serialize.c serialize.h sleep-config.c sleep-config.h + socket-protocol-list.c + socket-protocol-list.h spawn-ask-password-agent.c spawn-ask-password-agent.h spawn-polkit-agent.c @@ -99,13 +139,19 @@ shared_sources = files(''' uid-range.c uid-range.h utmp-wtmp.h + verbs.c + verbs.h vlan-util.c vlan-util.h volatile-util.c volatile-util.h watchdog.c watchdog.h + web-util.c + web-util.h wireguard-netlink.h + xml.c + xml.h '''.split()) if get_option('tests') != 'false' diff --git a/src/basic/os-util.c b/src/shared/os-util.c index 82471a45ba..82471a45ba 100644 --- a/src/basic/os-util.c +++ b/src/shared/os-util.c diff --git a/src/basic/os-util.h b/src/shared/os-util.h index 27ec7ac8d7..27ec7ac8d7 100644 --- a/src/basic/os-util.h +++ b/src/shared/os-util.h diff --git a/src/basic/reboot-util.c b/src/shared/reboot-util.c index ca40159b96..ca40159b96 100644 --- a/src/basic/reboot-util.c +++ b/src/shared/reboot-util.c diff --git a/src/basic/reboot-util.h b/src/shared/reboot-util.h index d459333efc..d459333efc 100644 --- a/src/basic/reboot-util.h +++ b/src/shared/reboot-util.h diff --git a/src/basic/rlimit-util.c b/src/shared/rlimit-util.c index c133f84b7e..c133f84b7e 100644 --- a/src/basic/rlimit-util.c +++ b/src/shared/rlimit-util.c diff --git a/src/basic/rlimit-util.h b/src/shared/rlimit-util.h index 6139af3ff5..6139af3ff5 100644 --- a/src/basic/rlimit-util.h +++ b/src/shared/rlimit-util.h diff --git a/src/basic/securebits-util.c b/src/shared/securebits-util.c index ad091f6d95..ad091f6d95 100644 --- a/src/basic/securebits-util.c +++ b/src/shared/securebits-util.c diff --git a/src/basic/securebits-util.h b/src/shared/securebits-util.h index 3cb3cb3d08..3cb3cb3d08 100644 --- a/src/basic/securebits-util.h +++ b/src/shared/securebits-util.h diff --git a/src/basic/socket-protocol-list.c b/src/shared/socket-protocol-list.c index 8041b84958..8041b84958 100644 --- a/src/basic/socket-protocol-list.c +++ b/src/shared/socket-protocol-list.c diff --git a/src/basic/socket-protocol-list.h b/src/shared/socket-protocol-list.h index 458904dbb3..458904dbb3 100644 --- a/src/basic/socket-protocol-list.h +++ b/src/shared/socket-protocol-list.h diff --git a/src/basic/verbs.c b/src/shared/verbs.c index f68c2bae08..f68c2bae08 100644 --- a/src/basic/verbs.c +++ b/src/shared/verbs.c diff --git a/src/basic/verbs.h b/src/shared/verbs.h index e174255a76..e174255a76 100644 --- a/src/basic/verbs.h +++ b/src/shared/verbs.h diff --git a/src/basic/web-util.c b/src/shared/web-util.c index 82221af194..82221af194 100644 --- a/src/basic/web-util.c +++ b/src/shared/web-util.c diff --git a/src/basic/web-util.h b/src/shared/web-util.h index c9e67e5c0a..c9e67e5c0a 100644 --- a/src/basic/web-util.h +++ b/src/shared/web-util.h diff --git a/src/basic/xml.c b/src/shared/xml.c index cb34d870c1..cb34d870c1 100644 --- a/src/basic/xml.c +++ b/src/shared/xml.c diff --git a/src/basic/xml.h b/src/shared/xml.h index 8da2ff5f75..8da2ff5f75 100644 --- a/src/basic/xml.h +++ b/src/shared/xml.h |