meson: we cannot call get_compiler('cpp') if we didn't "add" it

Follow-up for f6d783ac3d.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-10-09 18:48:09 +02:00 committed by Lennart Poettering
parent 13711093ef
commit 1b2acaa7a6
2 changed files with 4 additions and 1 deletions

View File

@ -278,6 +278,9 @@ cxx = find_program('c++', required : false)
if cxx.found() if cxx.found()
# Used only for tests # Used only for tests
add_languages('cpp') add_languages('cpp')
cpp_cmd = ' '.join(meson.get_compiler('cpp').cmd_array())
else
cpp_cmd = ''
endif endif
want_ossfuzz = get_option('oss-fuzz') want_ossfuzz = get_option('oss-fuzz')

View File

@ -9,7 +9,7 @@ sanitize_address = custom_target(
'fuzzers', 'fuzzers',
'-Db_lundef=false -Db_sanitize=address', '-Db_lundef=false -Db_sanitize=address',
' '.join(cc.cmd_array()), ' '.join(cc.cmd_array()),
' '.join(meson.get_compiler('cpp').cmd_array())]) cpp_cmd])
sanitizers = [['address', sanitize_address]] sanitizers = [['address', sanitize_address]]