diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-03-09 12:34:04 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-10-24 11:06:57 +0200 |
commit | d29ef2b128c651fa83f1d923290d66cc8eb63223 (patch) | |
tree | 73aae2279a382fc719d0bb8a0e9b40740922a8e0 /mesonbuild/compilers/detect.py | |
parent | 01ee14133906e4afa55cdc52eeb1c9e78bbeced5 (diff) | |
download | meson-d29ef2b128c651fa83f1d923290d66cc8eb63223.zip meson-d29ef2b128c651fa83f1d923290d66cc8eb63223.tar.gz meson-d29ef2b128c651fa83f1d923290d66cc8eb63223.tar.bz2 |
Add yasm as fallback for nasm language
Diffstat (limited to 'mesonbuild/compilers/detect.py')
-rw-r--r-- | mesonbuild/compilers/detect.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index f5c232d..8644d75 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -88,7 +88,7 @@ defaults['clang_cl_static_linker'] = ['llvm-lib'] defaults['cuda_static_linker'] = ['nvlink'] defaults['gcc_static_linker'] = ['gcc-ar'] defaults['clang_static_linker'] = ['llvm-ar'] -defaults['nasm'] = ['nasm'] +defaults['nasm'] = ['nasm', 'yasm'] def compiler_from_language(env: 'Environment', lang: str, for_machine: MachineChoice) -> T.Optional[Compiler]: @@ -1137,7 +1137,7 @@ def detect_swift_compiler(env: 'Environment', for_machine: MachineChoice) -> Com raise EnvironmentException('Unknown compiler: ' + join_args(exelist)) def detect_nasm_compiler(env: 'Environment', for_machine: MachineChoice) -> Compiler: - from .asm import NasmCompiler + from .asm import NasmCompiler, YasmCompiler compilers, _, _ = _get_compilers(env, 'nasm', for_machine) is_cross = env.is_cross_build(for_machine) @@ -1162,6 +1162,10 @@ def detect_nasm_compiler(env: 'Environment', for_machine: MachineChoice) -> Comp comp_class = NasmCompiler env.coredata.add_lang_args(comp_class.language, comp_class, for_machine, env) return comp_class(comp, version, for_machine, info, cc.linker, is_cross=is_cross) + elif 'yasm' in output: + comp_class = YasmCompiler + env.coredata.add_lang_args(comp_class.language, comp_class, for_machine, env) + return comp_class(comp, version, for_machine, info, cc.linker, is_cross=is_cross) _handle_exceptions(popen_exceptions, compilers) raise EnvironmentException('Unreachable code (exception to make mypy happy)') |