nasm test: Add a test for validating the Xcode backend

pull/11737/head
L. E. Segovia 2 years ago
parent af40f98d87
commit 53ec050e36
  1. 4
      test cases/nasm/4 through configure/dummy.asm.in
  2. 2
      test cases/nasm/4 through configure/dummy.def
  3. 30
      test cases/nasm/4 through configure/meson.build

@ -0,0 +1,4 @@
global dummy
section .rodata align=16
dummy:
dd 0x00010203

@ -0,0 +1,30 @@
project('through configure')
if not add_languages('nasm', required: false)
error('MESON_SKIP_TEST: nasm not found')
endif
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 meson.backend().startswith('vs')
error('MESON_SKIP_TEST: VS backend does not recognise NASM yet')
endif
section = host_machine.system() == 'macos' ? '.rodata' : '.rdata'
sources = configure_file(
input: 'dummy.asm.in',
output: 'dummy.asm',
configuration: {
'section': section
}
)
dummy = library(
'dummy',
sources,
vs_module_defs: 'dummy.def',
)
Loading…
Cancel
Save