diff options
author | Sahnvour <sahnvour@pm.me> | 2020-10-25 01:44:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-12-08 00:53:29 +0200 |
commit | d9c73a6a7b397d85f2efd84cdcfb82f66a94ef79 (patch) | |
tree | fc7b767033ec5631815950fa34d1711e9a661851 /mesonbuild/compilers/mixins | |
parent | 824e09159b83a76a73d94298563b8af47e5f8c26 (diff) | |
download | meson-d9c73a6a7b397d85f2efd84cdcfb82f66a94ef79.zip meson-d9c73a6a7b397d85f2efd84cdcfb82f66a94ef79.tar.gz meson-d9c73a6a7b397d85f2efd84cdcfb82f66a94ef79.tar.bz2 |
clang-cl: add a translation pass for `-isystem` args to work
Diffstat (limited to 'mesonbuild/compilers/mixins')
-rw-r--r-- | mesonbuild/compilers/mixins/visualstudio.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 1ea7219..ddd5476 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -26,6 +26,7 @@ from ... import mlog if T.TYPE_CHECKING: from ...environment import Environment + from ...dependencies import Dependency from .clike import CLikeCompiler as Compiler else: # This is a bit clever, for mypy we pretend that these mixins descend from @@ -437,3 +438,16 @@ class ClangClCompiler(VisualStudioLikeCompiler): def get_pch_base_name(self, header: str) -> str: return header + + + def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: + if dep.get_include_type() == 'system': + converted = [] + for i in dep.get_compile_args(): + if i.startswith('-isystem'): + converted += ['/clang:' + i] + else: + converted += [i] + return converted + else: + return dep.get_compile_args()
\ No newline at end of file |