]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: we cannot call get_compiler('cpp') if we didn't "add" it
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 9 Oct 2018 16:48:09 +0000 (18:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Oct 2018 19:12:00 +0000 (21:12 +0200)
Follow-up for f6d783ac3d145f3f3ffc2023d4ad90f76cf7fe34.

meson.build
test/fuzz/meson.build

index e3f06616b55862667194f4f353a7b8c2bc73f8ac..51407098dc25ea3b66e54583363e4dd3da81494c 100644 (file)
@@ -278,6 +278,9 @@ cxx = find_program('c++', required : false)
 if cxx.found()
         #  Used only for tests
         add_languages('cpp')
+        cpp_cmd = ' '.join(meson.get_compiler('cpp').cmd_array())
+else
+        cpp_cmd = ''
 endif
 
 want_ossfuzz = get_option('oss-fuzz')
index b4aadaab2ec9b54f31d96bab7ee536b512d7cdd2..b411e96915319a3192f0ce2a7211a12375a601aa 100644 (file)
@@ -9,7 +9,7 @@ sanitize_address = custom_target(
                    'fuzzers',
                    '-Db_lundef=false -Db_sanitize=address',
                    ' '.join(cc.cmd_array()),
-                   ' '.join(meson.get_compiler('cpp').cmd_array())])
+                   cpp_cmd])
 
 sanitizers = [['address', sanitize_address]]