aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-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):
"""