Commit 098a565c authored by Marvin Scholz's avatar Marvin Scholz

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.
parent 0040d92b
Pipeline #7318 passed with stages
in 6 minutes and 32 seconds
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment