diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-13 13:54:10 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-23 12:21:46 +0200 |
commit | 5e0f22896f7e007d790c9b606e7b7a940470eff0 (patch) | |
tree | 40e4915ba4760c404fef89af934534aa5ba0df59 /mesonbuild/compilers/mixins/visualstudio.py | |
parent | af6d70a1768e8611cbd937be5b8c8fd18e3f49f1 (diff) | |
download | meson-5e0f22896f7e007d790c9b606e7b7a940470eff0.zip meson-5e0f22896f7e007d790c9b606e7b7a940470eff0.tar.gz meson-5e0f22896f7e007d790c9b606e7b7a940470eff0.tar.bz2 |
Compilers: Add a preprocessor mode for clike compilers
A compiler object can now return a list of "modes", they are new
compiler object specialized for a specific task.
Diffstat (limited to 'mesonbuild/compilers/mixins/visualstudio.py')
-rw-r--r-- | mesonbuild/compilers/mixins/visualstudio.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index dc5e962..76ce9c1 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -159,6 +159,9 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta): def get_preprocess_only_args(self) -> T.List[str]: return ['/EP'] + def get_preprocess_to_file_args(self) -> T.List[str]: + return ['/EP', '/P'] + def get_compile_only_args(self) -> T.List[str]: return ['/c'] @@ -173,6 +176,8 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta): return ['/fsanitize=address'] def get_output_args(self, target: str) -> T.List[str]: + if self.mode == 'PREPROCESSOR': + return ['/Fi' + target] if target.endswith('.exe'): return ['/Fe' + target] return ['/Fo' + target] |