diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-29 17:12:49 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-07-01 13:59:48 +0000 |
commit | ae8d044cb6dca20c1d6504a27660bcbed16db438 (patch) | |
tree | 9e014e61387e087c5e7efc09499efff1f4af7306 /mesonbuild/interpreter.py | |
parent | 6bdacba001739983a9e5b7f78ba9d33ac7ebe6c9 (diff) | |
download | meson-ae8d044cb6dca20c1d6504a27660bcbed16db438.zip meson-ae8d044cb6dca20c1d6504a27660bcbed16db438.tar.gz meson-ae8d044cb6dca20c1d6504a27660bcbed16db438.tar.bz2 |
Allow command lists for find_program cross file overrides
This is accepted by all other binaries in the cross file. With this
change, we also don't check whether the specified command exists at
configure time, but that's probably a feature anyway.
Fixes https://github.com/mesonbuild/meson/issues/3737
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 79fc9fb..8f6f79d 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2627,8 +2627,12 @@ external dependencies (including libraries) must go to "dependencies".''') if not isinstance(p, str): raise InterpreterException('Executable name must be a string.') if p in bins: - exename = bins[p] - extprog = dependencies.ExternalProgram(exename, silent=silent) + command = bins[p] + if isinstance(command, (list, str)): + extprog = dependencies.ExternalProgram(p, command=command, silent=silent) + else: + raise InterpreterException('Invalid type {!r} for binary {!r} in cross file' + ''.format(command, p)) progobj = ExternalProgramHolder(extprog) return progobj |