meson: Fix build failure when compiler is not in PATH
When cross compiling gcc/clang could not exist in PATH and Meson could be using aarch64-linux-android-clang set in a cross file for example.
This commit is contained in:
parent
73353b3376
commit
abc723366d
|
@ -31,12 +31,13 @@ fc_sources = [
|
|||
]
|
||||
|
||||
# FIXME: obviously fragile, cc.preprocess would be sweet
|
||||
cpp = cc.cmd_array()
|
||||
if cc.get_id() == 'gcc'
|
||||
cpp = ['gcc', '-E', '-P']
|
||||
cpp += ['-E', '-P']
|
||||
elif cc.get_id() == 'msvc'
|
||||
cpp = ['cl', '/EP']
|
||||
cpp += ['/EP']
|
||||
elif cc.get_id() == 'clang'
|
||||
cpp = ['clang', '-E', '-P']
|
||||
cpp += ['-E', '-P']
|
||||
else
|
||||
error('FIXME: implement cc.preprocess')
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue