aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILDCONFIG.gn
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-12-06 13:26:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-06 19:15:55 +0000
commitd34c4a37276c240733a6d17812653636dc3656b5 (patch)
tree84e84b67935ad7475fb015aa867a5adb70493847 /gn/BUILDCONFIG.gn
parent1c80ea828373c3ae3f691c29933cede3c031f407 (diff)
Add win_toolchain_version to support MSVC 2017 Updates
To make this simpler in the future, add a python script that finds the most recent 2017 toolchain, and use that. If/when we update the bot toolchain, this will be even more helpful, because the Chromium toolchain isn't perfectly in sync with the general update channel, so people are likely to have a newer/older release locally. Note that explicitly setting win_toolchain_version in your GN args suppresses the python script, so you can choose to build with whatever version you need. Bug: skia: Change-Id: Iaf6d0dd9be2623472118c3ad27b20023a205d67c Reviewed-on: https://skia-review.googlesource.com/81162 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn/BUILDCONFIG.gn')
-rw-r--r--gn/BUILDCONFIG.gn7
1 files changed, 7 insertions, 0 deletions
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index b81680aa88..413f660a79 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -35,6 +35,7 @@ declare_args() {
windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
} else {
windk = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"
+ win_toolchain_version = ""
}
}
@@ -182,6 +183,12 @@ set_defaults("component") {
}
if (is_win) {
+ if (msvc == 2017 && win_toolchain_version == "") {
+ win_toolchain_version = exec_script("//gn/highest_version_dir.py",
+ [ "$windk/VC/Tools/MSVC" ],
+ "trim string")
+ }
+
# Windows tool chain
set_default_toolchain("//gn/toolchain:msvc")
default_toolchain_name = "msvc"