]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: build a standalone version of systemd-shutdown 25648/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 30 Nov 2022 08:25:49 +0000 (09:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 6 Dec 2022 09:15:54 +0000 (10:15 +0100)
I'd like to use this as a basis for an exitrd:

When compiled with -Dstandalone-binaries=true -Db_lto=true -Dbuildtype=release,
the new file is 800k. It's more than I'd like, but still quite a bit less
than libsystemd-shared.so, which is 3800k.

meson.build

index 6ff96da95020c7540a11b4c935a9cf5c4544f5c4..08c9c842abff831696d913029132d06a870e82ec 100644 (file)
@@ -3859,6 +3859,22 @@ executable(
         install : true,
         install_dir : rootlibexecdir)
 
+if have_standalone_binaries
+        executable(
+                'systemd-shutdown.standalone',
+                systemd_shutdown_sources,
+                include_directories : includes,
+                c_args : '-DSTANDALONE',
+                link_with : [libshared_static,
+                             libbasic,
+                             libsystemd_static],
+                dependencies : [libmount,
+                                versiondep],
+                install_rpath : rootpkglibdir,
+                install : true,
+                install_dir : rootlibexecdir)
+endif
+
 executable(
         'systemd-update-done',
         'src/update-done/update-done.c',