aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins/gnu.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-10-23 17:24:46 +0300
committerGitHub <noreply@github.com>2022-10-23 17:24:46 +0300
commit4c2b64188d574af79f4e949078a352e39710ed68 (patch)
tree0f5f30bd067e829b696f72df4be731bf1896817c /mesonbuild/compilers/mixins/gnu.py
parent064165485ce00aac64afd98120fd725032e559fd (diff)
parentebbaeec51b5c5c8177fe6583a2a5bd6b7f929684 (diff)
downloadmeson-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.py6
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):
"""