|
Zbigniew Jędrzejewski-Szmek |
f69edd |
From 3b101982011d787c05d7708740e6eada560c62cc Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
Date: Wed, 3 Jul 2024 17:03:26 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
Subject: [PATCH 2/3] meson: build libsystemd-core via an intermediate static
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
library
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
By itself, this is not useful. I'm making this a separate commit to
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
make debugging easier. It turns out that meson does static libraries
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
using references, so the "static library" a tiny stub stub that refers
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
to the object files on disk and this has negligible cost:
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
$ ls -lhd build/src/core/libsystemd-core-257.{a,so}
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
-rw-r--r-- 1 zbyszek zbyszek 36K Jul 3 16:54 build/src/core/libsystemd-core-257.a
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
-rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul 3 16:54 build/src/core/libsystemd-core-257.so
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
(cherry picked from commit d0689ee5fbfafa736e6eca89bc80cb2d372f2229)
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
src/core/meson.build | 16 +++++++++++-----
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
1 file changed, 11 insertions(+), 5 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
diff --git a/src/core/meson.build b/src/core/meson.build
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
index 7a2012a372..1ef31cc529 100644
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
--- a/src/core/meson.build
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+++ b/src/core/meson.build
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
@@ -110,17 +110,13 @@ load_fragment_gperf_nulstr_c = custom_target(
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libcore_name = 'systemd-core-@0@'.format(shared_lib_tag)
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
-libcore = shared_library(
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+libcore_static = static_library(
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libcore_name,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libcore_sources,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
load_fragment_gperf_c,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
load_fragment_gperf_nulstr_c,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
include_directories : includes,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
c_args : ['-fvisibility=default'],
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
- link_args : ['-shared',
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
- '-Wl,--version-script=' + libshared_sym_path],
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
- link_depends : libshared_sym_path,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
- link_with : libshared,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
dependencies : [libacl,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libapparmor,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libaudit,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
@@ -135,6 +131,16 @@ libcore = shared_library(
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
libselinux,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
threads,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
userspace],
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ build_by_default : false)
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+libcore = shared_library(
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ libcore_name,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ c_args : ['-fvisibility=default'],
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ link_args : ['-shared',
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ '-Wl,--version-script=' + libshared_sym_path],
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ link_depends : libshared_sym_path,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ link_whole: libcore_static,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
+ link_with : libshared,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
install : true,
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
install_dir : pkglibdir)
|
|
Zbigniew Jędrzejewski-Szmek |
38b885 |
|