From d9c73a6a7b397d85f2efd84cdcfb82f66a94ef79 Mon Sep 17 00:00:00 2001 From: Sahnvour Date: Sun, 25 Oct 2020 01:44:57 +0200 Subject: clang-cl: add a translation pass for `-isystem` args to work --- mesonbuild/compilers/mixins/visualstudio.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.1