diff options
| -rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 6 | ||||
| -rw-r--r-- | test cases/common/255 preprocess/src/meson.build | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 11efcc9fe..eb1c534e6 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -318,6 +318,12 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): def get_coverage_args(self) -> T.List[str]: return ['--coverage'] + def get_preprocess_to_file_args(self) -> T.List[str]: + # We want to allow preprocessing files with any extension, such as + # foo.c.in. In that case we need to tell GCC/CLANG to treat them as + # assembly file. + return self.get_preprocess_only_args() + ['-x', 'assembler-with-cpp'] + class GnuCompiler(GnuLikeCompiler): """ diff --git a/test cases/common/255 preprocess/src/meson.build b/test cases/common/255 preprocess/src/meson.build index 3169bb5ca..4cd955444 100644 --- a/test cases/common/255 preprocess/src/meson.build +++ b/test cases/common/255 preprocess/src/meson.build @@ -1,4 +1,3 @@ file_map = cc.preprocess('file.map.in', output: '@BASENAME@', - compile_args: ['-x', 'assembler-with-cpp'], ) |
