From: Zbigniew Jędrzejewski-Szmek Date: Tue, 30 Jun 2026 11:59:41 +0000 (+0200) Subject: meson: replace -Dbuild-executor-shared=single with -Dsystemd-multicall-binary=true X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcb2c6c259abce485211bdc4be409e4c13213481;p=thirdparty%2Fsystemd.git meson: replace -Dbuild-executor-shared=single with -Dsystemd-multicall-binary=true This effectively reverts the meson config changes introduced in 0c6186695a697831a7e5ccde0852ea35d4b2409b. 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! --- diff --git a/meson.build b/meson.build index 20eba736d73..0fcd12f0bdd 100644 --- a/meson.build +++ b/meson.build @@ -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. diff --git a/meson_options.txt b/meson_options.txt index 701272d13a0..ced6fac1e39 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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', diff --git a/src/core/executor.c b/src/core/executor.c index b227584789b..e771bdc0243 100644 --- a/src/core/executor.c +++ b/src/core/executor.c @@ -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 diff --git a/src/core/main.c b/src/core/main.c index 01911630dc4..c476400a93e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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 diff --git a/src/core/manager.c b/src/core/manager.c index eedb5e710d3..7fe2fe0a014 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -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); diff --git a/src/core/meson.build b/src/core/meson.build index 6e68a59d204..3708caf4e0b 100644 --- a/src/core/meson.build +++ b/src/core/meson.build @@ -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',