summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-10-09 16:02:55 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-10-11 11:10:37 +0200
commita5d8835c78112206bbf0812dd4cb471f803bfe88 (patch)
treef42a5d79e0d5b0357def1891b3b8dc8aa43feb0d /meson.build
parent7c48ea02800782651b7da373c6165abb052f1382 (diff)
downloadsystemd-a5d8835c78112206bbf0812dd4cb471f803bfe88.tar.gz
systemd-a5d8835c78112206bbf0812dd4cb471f803bfe88.tar.bz2
systemd-a5d8835c78112206bbf0812dd4cb471f803bfe88.zip
mempool: only enable mempool use when linked to libsystemd-shared.so
Mempool use is enabled or disabled based on the mempool_use_allowed symbol that is linked in. Should fix assert crashes in external programs caused by #9792. Replaces #10286. v2: - use two different source files instead of a gcc constructor
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build3
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 1ef07ae1a3..09986d58dc 100644
--- a/meson.build
+++ b/meson.build
@@ -1380,6 +1380,7 @@ libjournal_core = static_library(
libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
libsystemd = shared_library(
'systemd',
+ disable_mempool_c,
version : libsystemd_version,
include_directories : includes,
link_args : ['-shared',
@@ -1461,6 +1462,7 @@ subdir('test')
test_dlopen = executable(
'test-dlopen',
test_dlopen_c,
+ disable_mempool_c,
include_directories : includes,
link_with : [libbasic],
dependencies : [libdl],
@@ -1481,6 +1483,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
nss = shared_library(
'nss_' + module,
'src/nss-@0@/nss-@0@.c'.format(module),
+ disable_mempool_c,
version : '2',
include_directories : includes,
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned