]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: replace -Dbuild-executor-shared=single with -Dsystemd-multicall-binary=true
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Tue, 30 Jun 2026 11:59:41 +0000 (13:59 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 2 Jul 2026 14:35:36 +0000 (16:35 +0200)
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!

meson.build
meson_options.txt
src/core/executor.c
src/core/main.c
src/core/manager.c
src/core/meson.build

index 20eba736d73f9556a7abba6f6011e73b7a936993..0fcd12f0bddbb6ae0abbe09ac55d09825ecd4d27 100644 (file)
@@ -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.
index 701272d13a06d92f711dc6a947429c15e1bf6a87..ced6fac1e39fb44fe6a06dc49882e5d99a93ae9f 100644 (file)
@@ -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',
index b227584789be2ce85941b128f176ace619016f7c..e771bdc02438f57860bc884852d955399a9235b1 100644 (file)
@@ -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
index 01911630dc4a0238f23661aecebfd2faaabbcf67..c476400a93eb85dc427cb1c8f09d2e82dfaa0bfc 100644 (file)
@@ -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
index eedb5e710d377cde6b89fc8ae114890fcc929c9b..7fe2fe0a014f70cb6edfd3ce9320ec574ad84a89 100644 (file)
@@ -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);
index 6e68a59d204db06454984bbd9afc6a17f16fdb60..3708caf4e0bbaab953d0457a5bc0c6b7052542e7 100644 (file)
@@ -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',