Index: build/config/win/BUILD.gn |
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn |
index 201d45baf5b7f621c011462afbe9d0ba711fb1a8..95fc18f2b780bee9ec72e06b3b0667573e06f5b3 100644 |
--- a/build/config/win/BUILD.gn |
+++ b/build/config/win/BUILD.gn |
@@ -138,3 +138,14 @@ config("lean_and_mean") { |
config("nominmax") { |
defines = [ "NOMINMAX" ] |
} |
+ |
+# 4702 warning ----------------------------------------------------------------- |
+ |
+# VS xtree header file needs to be patched or 4702 (unreachable code warning) |
+# is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is not patched. |
+ |
+config("msvs_xtree_unreachable_code") { |
+ if (!msvs_xtree_patched) { |
+ cflags = [ "/wd4702" ] |
+ } |
+} |