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
-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