You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
project('test', 'c')
|
|
|
|
|
|
|
|
if not host_machine.cpu_family().startswith('x86')
|
|
|
|
assert(not add_languages('nasm', required: false))
|
|
|
|
error('MESON_SKIP_TEST: nasm only supported for x86 and x86_64')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not add_languages('nasm', required: false)
|
|
|
|
nasm = find_program('nasm', 'yasm', required: false)
|
|
|
|
assert(not nasm.found())
|
|
|
|
error('MESON_SKIP_TEST: nasm not found')
|
|
|
|
endif
|
|
|
|
|
|
|
|
config_file = configure_file(
|
|
|
|
output: 'config.asm',
|
|
|
|
configuration: {'HELLO': 0},
|
|
|
|
output_format: 'nasm',
|
|
|
|
)
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
link_args = cc.get_supported_link_arguments(['-no-pie'])
|
|
|
|
|
|
|
|
exe = executable('hello', 'hello.asm',
|
|
|
|
nasm_args: '-DFOO',
|
|
|
|
link_args: link_args,
|
|
|
|
)
|
|
|
|
test('hello', exe)
|