diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-23 17:24:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 17:24:46 +0300 |
commit | 4c2b64188d574af79f4e949078a352e39710ed68 (patch) | |
tree | 0f5f30bd067e829b696f72df4be731bf1896817c /mesonbuild/compilers/mixins/gnu.py | |
parent | 064165485ce00aac64afd98120fd725032e559fd (diff) | |
parent | ebbaeec51b5c5c8177fe6583a2a5bd6b7f929684 (diff) | |
download | meson-4c2b64188d574af79f4e949078a352e39710ed68.zip meson-4c2b64188d574af79f4e949078a352e39710ed68.tar.gz meson-4c2b64188d574af79f4e949078a352e39710ed68.tar.bz2 |
Merge pull request #10916 from xclaesse/preprocess
Add cc.preprocess() method
Diffstat (limited to 'mesonbuild/compilers/mixins/gnu.py')
-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): """ |