diff options
author | L. E. Segovia <amy@amyspark.me> | 2023-04-25 21:36:38 +0000 |
---|---|---|
committer | L. E. Segovia <amy@amyspark.me> | 2024-04-09 22:11:03 -0300 |
commit | 7b77fa01745171bed238b4c40a6b485c67d6b060 (patch) | |
tree | 89c1ebdfbc2052ae39e95e8799ebfd1820cd4fc9 /mesonbuild/compilers/asm.py | |
parent | d6a0b7a6ecde30d44fb1960866385d8f5a6e30f3 (diff) | |
download | meson-7b77fa01745171bed238b4c40a6b485c67d6b060.zip meson-7b77fa01745171bed238b4c40a6b485c67d6b060.tar.gz meson-7b77fa01745171bed238b4c40a6b485c67d6b060.tar.bz2 |
nasm, yasm: Fix debug flags for Windows and macOS
Diffstat (limited to 'mesonbuild/compilers/asm.py')
-rw-r--r-- | mesonbuild/compilers/asm.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py index d04fbd2..0cf8cff 100644 --- a/mesonbuild/compilers/asm.py +++ b/mesonbuild/compilers/asm.py @@ -27,6 +27,7 @@ nasm_optimization_args: T.Dict[str, T.List[str]] = { class NasmCompiler(Compiler): language = 'nasm' id = 'nasm' + links_with_msvc = False # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features crt_args: T.Dict[str, T.List[str]] = { @@ -44,6 +45,7 @@ class NasmCompiler(Compiler): super().__init__(ccache, exelist, version, for_machine, info, linker, full_version, is_cross) if 'link' in self.linker.id: self.base_options.add(OptionKey('b_vscrt')) + self.links_with_msvc = True def needs_static_linker(self) -> bool: return True @@ -83,9 +85,7 @@ class NasmCompiler(Compiler): def get_debug_args(self, is_debug: bool) -> T.List[str]: if is_debug: - if self.info.is_windows(): - return [] - return ['-g', '-F', 'dwarf'] + return ['-g'] return [] def get_depfile_suffix(self) -> str: @@ -138,9 +138,12 @@ class YasmCompiler(NasmCompiler): def get_debug_args(self, is_debug: bool) -> T.List[str]: if is_debug: - if self.info.is_windows(): + if self.info.is_windows() and self.links_with_msvc: + return ['-g', 'cv8'] + elif self.info.is_darwin(): return ['-g', 'null'] - return ['-g', 'dwarf2'] + else: + return ['-g', 'dwarf2'] return [] def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: |