diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-23 11:28:42 +0200 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-23 12:21:46 +0200 |
commit | ebbaeec51b5c5c8177fe6583a2a5bd6b7f929684 (patch) | |
tree | aaf6ea5364dd3c110f9308e4a4fd3a3670d5a008 /mesonbuild/compilers | |
parent | d53486bf9c7d860141371c90d0dc1c923a350fed (diff) | |
download | meson-ebbaeec51b5c5c8177fe6583a2a5bd6b7f929684.zip meson-ebbaeec51b5c5c8177fe6583a2a5bd6b7f929684.tar.gz meson-ebbaeec51b5c5c8177fe6583a2a5bd6b7f929684.tar.bz2 |
gnulike: Fix preprocessing files with any extension
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 11efcc9..eb1c534 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): """ |