asm: Add sx extension
docs: gcc https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html scons: https://scons.org/doc/3.0.5/HTML/scons-user/apb.html .S Windows: assembly language file ARM: CodeSourcery Sourcery Lite .sx assembly language file + C pre-processor POSIX: assembly language file + C pre-processor
This commit is contained in:
parent
b85ffbacb1
commit
4fedf19f41
|
@ -77,7 +77,7 @@ all_languages = lang_suffixes.keys()
|
|||
c_cpp_suffixes = {'h'}
|
||||
cpp_suffixes = set(lang_suffixes['cpp']) | c_cpp_suffixes
|
||||
c_suffixes = set(lang_suffixes['c']) | c_cpp_suffixes
|
||||
assembler_suffixes = {'s', 'S', 'asm', 'masm'}
|
||||
assembler_suffixes = {'s', 'S', 'sx', 'asm', 'masm'}
|
||||
llvm_ir_suffixes = {'ll'}
|
||||
all_suffixes = set(itertools.chain(*lang_suffixes.values(), assembler_suffixes, llvm_ir_suffixes, c_cpp_suffixes))
|
||||
source_suffixes = all_suffixes - header_suffixes
|
||||
|
|
|
@ -90,6 +90,7 @@ class ArmCompiler(Compiler):
|
|||
'everything': default_warn_args + []} # type: T.Dict[str, T.List[str]]
|
||||
# Assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
|
||||
def get_pic_args(self) -> T.List[str]:
|
||||
# FIXME: Add /ropi, /rwpi, /fpic etc. qualifiers to --apcs
|
||||
|
@ -161,6 +162,7 @@ class ArmclangCompiler(Compiler):
|
|||
'b_ndebug', 'b_staticpic', 'b_colorout']}
|
||||
# Assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
|
||||
def get_pic_args(self) -> T.List[str]:
|
||||
# PIC support is not enabled by default for ARM,
|
||||
|
|
|
@ -68,6 +68,7 @@ class CompCertCompiler(Compiler):
|
|||
def __init__(self) -> None:
|
||||
# Assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
default_warn_args = [] # type: T.List[str]
|
||||
self.warn_args = {'0': [],
|
||||
'1': default_warn_args,
|
||||
|
|
|
@ -389,6 +389,7 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta):
|
|||
self.base_options.add(OptionKey('b_sanitize'))
|
||||
# All GCC-like backends can do assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
|
||||
def get_pic_args(self) -> T.List[str]:
|
||||
if self.info.is_windows() or self.info.is_cygwin() or self.info.is_darwin():
|
||||
|
|
|
@ -469,6 +469,7 @@ class ClangClCompiler(VisualStudioLikeCompiler):
|
|||
|
||||
# Assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
|
||||
def has_arguments(self, args: T.List[str], env: 'Environment', code: str, mode: str) -> T.Tuple[bool, bool]:
|
||||
if mode != 'link':
|
||||
|
|
|
@ -65,6 +65,7 @@ class Xc16Compiler(Compiler):
|
|||
raise EnvironmentException('xc16 supports only cross-compilation.')
|
||||
# Assembly
|
||||
self.can_compile_suffixes.add('s')
|
||||
self.can_compile_suffixes.add('sx')
|
||||
default_warn_args = [] # type: T.List[str]
|
||||
self.warn_args = {'0': [],
|
||||
'1': default_warn_args,
|
||||
|
|
Loading…
Reference in New Issue