]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: build tests for nspawn even -Dnspawn= is disabled
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Apr 2025 14:43:33 +0000 (23:43 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Apr 2025 07:03:33 +0000 (09:03 +0200)
Follow-up for d95818f5221d9b9b19648cffa0cb2407f023b27e.
Fixes #36880.

src/nspawn/meson.build
test/fuzz/meson.build

index d0c919e1e335a65dedda20aa1faa55e1058d6952..84e80d6e2db794935cf36910fc5dcfe99a81c311 100644 (file)
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-if conf.get('ENABLE_NSPAWN') != 1
-        subdir_done()
-endif
-
 libnspawn_core_sources = files(
         'nspawn-bind-user.c',
         'nspawn-cgroup.c',
@@ -52,6 +48,7 @@ executables += [
         executable_template + {
                 'name' : 'systemd-nspawn',
                 'public' : true,
+                'conditions' : ['ENABLE_NSPAWN'],
                 'sources' : files('nspawn.c'),
                 'link_with' : nspawn_libs,
                 'dependencies' : [
index 3f97e3fa6fbf651ad43ee77830ae09580bbb2ff5..db1dcb291c9b3422f776f63bad2802a11df9671e 100644 (file)
@@ -60,7 +60,7 @@ sanitize_address_undefined = custom_target(
                    'fuzzers',
                    ' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
                    ' '.join(fuzz_cpp_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
-                   '-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined -Dnspawn=enabled --optimization=@0@ @1@ --auto-features=@2@'.format(
+                   '-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined --optimization=@0@ @1@ --auto-features=@2@'.format(
                            get_option('optimization'),
                            get_option('werror') ? '--werror' : '',
                            sanitize_auto_features