Commit 2d3e3ef0 authored by Janne Grunau's avatar Janne Grunau Committed by Henrik Gramner

meson: error on nasm < 2.13

The x86 asm requires nasm and an error from meson is easier to
understand than cryptic errors from nasm.
parent a8d24ea1
...@@ -259,6 +259,19 @@ if is_asm_enabled and host_machine.cpu_family().startswith('x86') ...@@ -259,6 +259,19 @@ if is_asm_enabled and host_machine.cpu_family().startswith('x86')
nasm = find_program('nasm') nasm = find_program('nasm')
# check NASM version
if nasm.found()
nasm_r = run_command(nasm, '-v')
out = nasm_r.stdout().strip().split()
if out[1].to_lower() == 'version'
if out[2].version_compare('<2.13')
error('nasm 2.13 or later is required, found nasm @0@'.format(out[2]))
endif
else
error('unexpected nasm version string: @0@'.format(nasm_r.stdout()))
endif
endif
if host_machine.system() == 'windows' if host_machine.system() == 'windows'
nasm_format = 'win' nasm_format = 'win'
elif host_machine.system() == 'darwin' elif host_machine.system() == 'darwin'
......
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