From 1b2acaa7a642ad9b95e97f2752ce7c86874caaa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Oct 2018 18:48:09 +0200 Subject: [PATCH] meson: we cannot call get_compiler('cpp') if we didn't "add" it Follow-up for f6d783ac3d145f3f3ffc2023d4ad90f76cf7fe34. --- meson.build | 3 +++ test/fuzz/meson.build | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e3f06616b5..51407098dc 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build index b4aadaab2e..b411e96915 100644 --- a/test/fuzz/meson.build +++ b/test/fuzz/meson.build @@ -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]]