Index: build/config/win/visual_studio_version.gni |
diff --git a/build/config/win/visual_studio_version.gni b/build/config/win/visual_studio_version.gni |
index 6a2828c355319ec24bcf87aafe70499f599f07df..62730dc4ce49c86ad556221453acc4c8351f66f5 100644 |
--- a/build/config/win/visual_studio_version.gni |
+++ b/build/config/win/visual_studio_version.gni |
@@ -20,6 +20,11 @@ declare_args() { |
# This value is the default location, override if you have a different |
# installation location. |
windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.1" |
+ |
+ # Whether the VS xtree header has been patched to disable warning 4702. If |
+ # it has, then we don't need to disable 4702 (unreachable code warning). |
+ # The patch is preapplied to the internal toolchain and hence all bots. |
+ msvs_xtree_patched = false |
} |
if (visual_studio_path == "") { |
@@ -37,3 +42,9 @@ if (visual_studio_path == "") { |
"You must set the wdk_path if you set the visual studio path") |
visual_studio_runtime_dirs = [] |
} |
+ |
+if (!msvs_xtree_patched) { |
+ if (exec_script("../../win_is_xtree_patched.py", [], "value") == 1) { |
+ msvs_xtree_patched = true |
+ } |
+} |