Fix for Issue 8910 (Meson filters CMake asm files)

pull/8912/head
Justin Handville 3 years ago committed by Daniel Mensinger
parent 5cd9f88d6c
commit 9f248c778d
  1. 4
      mesonbuild/cmake/interpreter.py
  2. 3
      mesonbuild/compilers/compilers.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]

@ -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, ...]

Loading…
Cancel
Save