diff options
author | Marvin Scholz <epirat07@gmail.com> | 2019-06-04 23:55:02 +0300 |
---|---|---|
committer | Marvin Scholz <epirat07@gmail.com> | 2019-06-04 23:55:02 +0300 |
commit | 098a565c551cbe41b5749f6e1d896df0daab96d1 (patch) | |
tree | c676f7f96f1073eab82348cead60c9b865dd3035 /meson.build | |
parent | 0040d92bfaa89967f5757f0efca5ee0edd28aec8 (diff) |
meson: Fix nasm detection
nasm -v can actually fail for example on macOS, where nasm could be a
stub executable that forwards commands to the real nasm, but if the real
nasm is not installed, fails.
This would lead to a confusing error message due to the out of bounds
array access, to avoid that, explicitly check the exit code.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 32e8f97..bafe20a 100644 --- a/meson.build +++ b/meson.build @@ -339,6 +339,11 @@ if is_asm_enabled and host_machine.cpu_family().startswith('x86') # check NASM version if nasm.found() nasm_r = run_command(nasm, '-v') + + if nasm_r.returncode() != 0 + error('failed running nasm to obtain its version') + endif + out = nasm_r.stdout().strip().split() if out[1].to_lower() == 'version' if out[2].version_compare('<2.13.02') |