use /imsvc with clang-cl where we use -isystem
This should disable warnings from third-party headers
on Clang/Win builds. So far we've just gotten lucky.
Change-Id: Ieaf459e200925d46d8c65ba8d489db111705b125
Reviewed-on: https://skia-review.googlesource.com/c/191283
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/third_party/third_party.gni b/third_party/third_party.gni
index 3c1059a..e35c3ec 100644
--- a/third_party/third_party.gni
+++ b/third_party/third_party.gni
@@ -11,8 +11,15 @@
if (defined(invoker.public_defines)) {
defines = invoker.public_defines
}
- if (is_win) {
+ if (is_win && !is_clang) {
include_dirs = invoker.public_include_dirs
+ } else if (is_win && is_clang) {
+ foreach(dir, invoker.public_include_dirs) {
+ cflags += [
+ "/imsvc",
+ rebase_path(dir),
+ ]
+ }
} else {
foreach(dir, invoker.public_include_dirs) {
cflags += [