|
|
@ -27,6 +27,7 @@ nasm_optimization_args: T.Dict[str, T.List[str]] = { |
|
|
|
class NasmCompiler(Compiler): |
|
|
|
class NasmCompiler(Compiler): |
|
|
|
language = 'nasm' |
|
|
|
language = 'nasm' |
|
|
|
id = 'nasm' |
|
|
|
id = 'nasm' |
|
|
|
|
|
|
|
links_with_msvc = False |
|
|
|
|
|
|
|
|
|
|
|
# https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features |
|
|
|
# https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features |
|
|
|
crt_args: T.Dict[str, T.List[str]] = { |
|
|
|
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) |
|
|
|
super().__init__(ccache, exelist, version, for_machine, info, linker, full_version, is_cross) |
|
|
|
if 'link' in self.linker.id: |
|
|
|
if 'link' in self.linker.id: |
|
|
|
self.base_options.add(OptionKey('b_vscrt')) |
|
|
|
self.base_options.add(OptionKey('b_vscrt')) |
|
|
|
|
|
|
|
self.links_with_msvc = True |
|
|
|
|
|
|
|
|
|
|
|
def needs_static_linker(self) -> bool: |
|
|
|
def needs_static_linker(self) -> bool: |
|
|
|
return True |
|
|
|
return True |
|
|
@ -83,9 +85,7 @@ class NasmCompiler(Compiler): |
|
|
|
|
|
|
|
|
|
|
|
def get_debug_args(self, is_debug: bool) -> T.List[str]: |
|
|
|
def get_debug_args(self, is_debug: bool) -> T.List[str]: |
|
|
|
if is_debug: |
|
|
|
if is_debug: |
|
|
|
if self.info.is_windows(): |
|
|
|
return ['-g'] |
|
|
|
return [] |
|
|
|
|
|
|
|
return ['-g', '-F', 'dwarf'] |
|
|
|
|
|
|
|
return [] |
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
|
|
def get_depfile_suffix(self) -> str: |
|
|
|
def get_depfile_suffix(self) -> str: |
|
|
@ -138,9 +138,12 @@ class YasmCompiler(NasmCompiler): |
|
|
|
|
|
|
|
|
|
|
|
def get_debug_args(self, is_debug: bool) -> T.List[str]: |
|
|
|
def get_debug_args(self, is_debug: bool) -> T.List[str]: |
|
|
|
if is_debug: |
|
|
|
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', 'null'] |
|
|
|
return ['-g', 'dwarf2'] |
|
|
|
else: |
|
|
|
|
|
|
|
return ['-g', 'dwarf2'] |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
|
|
def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: |
|
|
|
def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: |
|
|
|