meson: replace -Dbuild-executor-shared=single with -Dsystemd-multicall-binary=true
This effectively reverts the meson config changes introduced in
0c6186695a. I wasn't happy with that form
back when it was commited, and in hindsight, I like it even less. Let's
just add a new option that hopefully is easier to understand and will
work better when new functionality is added in the future.
Now there are two options:
link-executor-shared (boolean, defaults to true)
— "link (separate) systemd-executor to libsystemd-shared.so and libsystemd-core.so"
systemd-multicall-binary (also boolean, defaults to false)
— "link systemd+systemd-executor as a single binary"
Build directories will need to be recreated again, sorry!
This commit is contained in:
+1
-2
@@ -78,8 +78,7 @@ conf.set10('FUZZ_USE_SIZE_LIMIT', fuzzer_build)
|
||||
# We'll set this to '1' for EFI builds in a different place.
|
||||
conf.set10('SD_BOOT', false)
|
||||
|
||||
link_executor_shared = get_option('link-executor-shared')
|
||||
conf.set10('BUILD_EXECUTOR_SINGLE', link_executor_shared == 'single')
|
||||
conf.set10('SYSTEMD_MULTICALL_BINARY', get_option('systemd-multicall-binary'))
|
||||
|
||||
# Create a title-less summary section early, so it ends up first in the output.
|
||||
# More items are added later after they have been detected.
|
||||
|
||||
+4
-2
@@ -15,8 +15,10 @@ option('split-bin', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'sbin is not a symlink to bin')
|
||||
option('link-udev-shared', type : 'boolean',
|
||||
description : 'link systemd-udevd and its helpers to libsystemd-shared.so')
|
||||
option('link-executor-shared', type : 'combo', choices : ['true', 'false', 'single'],
|
||||
description : 'link systemd-executor to libsystemd-shared.so and libsystemd-core.so, or into systemd')
|
||||
option('systemd-multicall-binary', type : 'boolean', value : false,
|
||||
description : 'link systemd+systemd-executor as a single binary')
|
||||
option('link-executor-shared', type : 'boolean',
|
||||
description : 'link (separate) systemd-executor to libsystemd-shared.so and libsystemd-core.so')
|
||||
option('link-systemctl-shared', type: 'boolean',
|
||||
description : 'link systemctl against libsystemd-shared.so')
|
||||
option('link-networkd-shared', type: 'boolean',
|
||||
|
||||
+1
-1
@@ -245,6 +245,6 @@ int run_executor(int argc, char *argv[]) {
|
||||
return r < 0 ? EXIT_FAILURE : r;
|
||||
}
|
||||
|
||||
#if !BUILD_EXECUTOR_SINGLE
|
||||
#if !SYSTEMD_MULTICALL_BINARY
|
||||
_alias_(run_executor) main;
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -3932,7 +3932,7 @@ finish:
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
#if BUILD_EXECUTOR_SINGLE
|
||||
#if SYSTEMD_MULTICALL_BINARY
|
||||
if (invoked_as(argv, "executor"))
|
||||
return run_executor(argc, argv);
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -900,7 +900,7 @@ static int pin_executor_binary(int *ret_fd) {
|
||||
|
||||
assert(ret_fd);
|
||||
|
||||
#if BUILD_EXECUTOR_SINGLE
|
||||
#if SYSTEMD_MULTICALL_BINARY
|
||||
int r;
|
||||
|
||||
r = open_and_check_executable("/proc/self/exe", /* root= */ NULL, &path, ret_fd);
|
||||
|
||||
@@ -209,11 +209,9 @@ systemd_deps = [
|
||||
libselinux_cflags,
|
||||
]
|
||||
|
||||
link_executor_shared = get_option('link-executor-shared')
|
||||
executor_libs = get_option('link-executor-shared') ? core_libs_shared : core_libs_static
|
||||
|
||||
executor_libs = link_executor_shared == 'true' ? core_libs_shared : core_libs_static
|
||||
|
||||
if link_executor_shared == 'single'
|
||||
if conf.get('SYSTEMD_MULTICALL_BINARY') == 1
|
||||
systemd_sources += systemd_executor_sources
|
||||
systemd_deps += [
|
||||
libbpf_cflags,
|
||||
@@ -256,7 +254,7 @@ executables += [
|
||||
},
|
||||
]
|
||||
|
||||
if link_executor_shared == 'single'
|
||||
if conf.get('SYSTEMD_MULTICALL_BINARY') == 1
|
||||
# Symlink for external callers
|
||||
install_symlink('systemd-executor',
|
||||
pointing_to : 'systemd',
|
||||
|
||||
Reference in New Issue
Block a user