diff options
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 4 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index f79f7d2..745def1 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -24,7 +24,7 @@ from .traceparser import CMakeTraceParser, CMakeGeneratorTarget from .. import mlog, mesonlib from ..mesonlib import MachineChoice, OrderedSet, version_compare, path_is_in_root, relative_to_if_possible, OptionKey from ..mesondata import mesondata -from ..compilers.compilers import lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header +from ..compilers.compilers import assembler_suffixes, lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header from ..programs import ExternalProgram from enum import Enum from functools import lru_cache @@ -435,7 +435,7 @@ class ConverterTarget: self.link_libraries = temp # Filter out files that are not supported by the language - supported = list(header_suffixes) + list(obj_suffixes) + supported = list(assembler_suffixes) + list(header_suffixes) + list(obj_suffixes) for i in self.languages: supported += list(lang_suffixes[i]) supported = [f'.{x}' for x in supported] diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index efe521c..b21142f 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -73,6 +73,9 @@ c_suffixes = lang_suffixes['c'] + ('h',) # type: T.Tuple[str, ...] # List of languages that by default consume and output libraries following the # C ABI; these can generally be used interchangeably clib_langs = ('objcpp', 'cpp', 'objc', 'c', 'fortran',) # type: T.Tuple[str, ...] +# List of assembler suffixes that can be linked with C code directly by the linker +assembler_suffixes = tuple() # type: T.Tuple[str, ...] +assembler_suffixes += ('s', 'S') # List of languages that can be linked with C code directly by the linker # used in build.py:process_compilers() and build.py:get_dynamic_linker() clink_langs = ('d', 'cuda') + clib_langs # type: T.Tuple[str, ...] |