diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-09 16:25:00 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-15 19:48:26 +0200 |
commit | 0bc44da70220dad84c62840fd3e9b5405decd885 (patch) | |
tree | e747d6c452dfac8089720b71cb0241a851a57d1a | |
parent | 4aea0276f09130578ed1f1c49e094ab4e0694263 (diff) | |
download | meson-0bc44da70220dad84c62840fd3e9b5405decd885.zip meson-0bc44da70220dad84c62840fd3e9b5405decd885.tar.gz meson-0bc44da70220dad84c62840fd3e9b5405decd885.tar.bz2 |
tests/common/126: Also skip unsupported CPUs here
Related to https://github.com/mesonbuild/meson/pull/1289 and
https://github.com/mesonbuild/meson/issue/1287
-rw-r--r-- | test cases/common/126 llvm ir and assembly/meson.build | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test cases/common/126 llvm ir and assembly/meson.build b/test cases/common/126 llvm ir and assembly/meson.build index 97cce18..4ce4636 100644 --- a/test cases/common/126 llvm ir and assembly/meson.build +++ b/test cases/common/126 llvm ir and assembly/meson.build @@ -1,5 +1,8 @@ project('llvm-ir', 'c', 'cpp') +cpu = host_machine.cpu_family() +supported_cpus = ['arm', 'x86', 'x86_64'] + foreach lang : ['c', 'cpp'] cc = meson.get_compiler(lang) cc_id = cc.get_id() @@ -20,7 +23,6 @@ foreach lang : ['c', 'cpp'] uscore_args = [] message('underscore is NOT prefixed') endif - cpu = host_machine.cpu_family() square_base = 'square-' + cpu square_impl = square_base + '.S' # MSVC cannot directly compile assembly files, so we pass it through the @@ -46,9 +48,12 @@ foreach lang : ['c', 'cpp'] input : square_preproc, output : lang + square_base + '.obj', command : [ml, '/Fo', '@OUTPUT@', '/c', '@INPUT@']) - endif - e = executable('square_asm_' + lang, square_impl, 'main.' + lang, - c_args : uscore_args, cpp_args : uscore_args) - test('test ASM square' + lang, e) + if supported_cpus.contains(cpu) + e = executable('square_asm_' + lang, square_impl, 'main.' + lang, + c_args : uscore_args, cpp_args : uscore_args) + test('test ASM square' + lang, e) + elif cc_id != 'clang' + error('MESON_SKIP_TEST: Unsupported cpu: "' + cpu + '", and LLVM not found') + endif endforeach |