aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gn/BUILD.gn10
-rw-r--r--gn/BUILDCONFIG.gn50
-rw-r--r--gn/toolchain/BUILD.gn22
-rw-r--r--infra/bots/assets/win_toolchain/VERSION2
-rw-r--r--infra/bots/assets/win_toolchain_2015/VERSION1
-rwxr-xr-xinfra/bots/assets/win_toolchain_2015/common.py26
-rwxr-xr-xinfra/bots/assets/win_toolchain_2015/download.py16
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Debug-GDI.json2
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json2
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release.json2
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-MSVC-x86-Debug-Exceptions.json2
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All.json2
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py4
-rw-r--r--infra/bots/recipes/compile.expected/Build-Win-Clang-x86_64-Release-Vulkan.json2
-rw-r--r--infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-ANGLE.json2
-rw-r--r--infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-Exceptions.json2
-rw-r--r--infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug.json2
-rw-r--r--infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Release-GDI.json2
-rw-r--r--infra/bots/recipes/compile.expected/alternate_repo.json2
-rw-r--r--infra/bots/recipes/compile.expected/trybot.json2
-rw-r--r--infra/bots/tasks.json2
-rw-r--r--site/user/build.md20
22 files changed, 124 insertions, 53 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index cf94889a70..4819ee151a 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -55,9 +55,9 @@ config("default") {
]
if (msvc == 2015) {
- _include_dirs = [ "$windk/VC/include" ]
+ _include_dirs = [ "$win_vc/include" ]
} else { # 2017
- _include_dirs = [ "$windk/VC/Tools/MSVC/$win_toolchain_version/include" ]
+ _include_dirs = [ "$win_vc/Tools/MSVC/$win_toolchain_version/include" ]
}
_include_dirs += [
"$win_sdk/Include/$win_sdk_version/shared",
@@ -83,13 +83,13 @@ config("default") {
]
if (msvc == 2015) {
if (target_cpu == "x86") {
- lib_dirs += [ "$windk/VC/lib" ]
+ lib_dirs += [ "$win_vc/lib" ]
} else {
- lib_dirs += [ "$windk/VC/lib/amd64" ]
+ lib_dirs += [ "$win_vc/lib/amd64" ]
}
} else { # 2017
lib_dirs +=
- [ "$windk/VC/Tools/MSVC/$win_toolchain_version/lib/$target_cpu" ]
+ [ "$win_vc/Tools/MSVC/$win_toolchain_version/lib/$target_cpu" ]
}
} else {
cflags += [
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index e9912e2c26..80cc0986cc 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -25,20 +25,16 @@ declare_args() {
cc = "cc"
cxx = "c++"
- msvc = 2015
+ win_sdk = "C:/Program Files (x86)/Windows Kits/10"
+ win_sdk_version = ""
+
+ win_vc = ""
+ win_toolchain_version = ""
+
clang_win = ""
}
declare_args() {
is_debug = !is_official_build
-
- if (msvc == 2015) {
- windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
- } else {
- windk = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"
- win_toolchain_version = ""
- }
- win_sdk = "C:/Program Files (x86)/Windows Kits/10"
- win_sdk_version = ""
}
assert(!(is_debug && is_official_build))
@@ -133,10 +129,42 @@ if (is_android) {
}
}
+msvc = ""
+if (target_os == "win") {
+ # By default we look for 2017, then 2015. If MSVC is installed in a non-default
+ # location, you can set win_vc to inform us where it is.
+ vc_2017_default =
+ "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC"
+ vc_2015_default = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC"
+
+ if (win_vc == "") {
+ if ("True" ==
+ exec_script("//gn/checkdir.py", [ "$vc_2017_default" ], "trim string")) {
+ win_vc = vc_2017_default
+ msvc = 2017
+ } else if ("True" == exec_script("//gn/checkdir.py",
+ [ "$vc_2015_default" ],
+ "trim string")) {
+ win_vc = vc_2015_default
+ msvc = 2015
+ }
+ }
+ assert(win_vc != "") # Could not find VC installation. Set win_vc to your VC directory.
+
+ if (msvc == "") {
+ if ("True" ==
+ exec_script("//gn/checkdir.py", [ "$win_vc/Tools" ], "trim string")) {
+ msvc = 2017
+ } else {
+ msvc = 2015
+ }
+ }
+}
+
if (target_os == "win") {
if (msvc == 2017 && win_toolchain_version == "") {
win_toolchain_version = exec_script("//gn/highest_version_dir.py",
- [ "$windk/VC/Tools/MSVC" ],
+ [ "$win_vc/Tools/MSVC" ],
"trim string")
}
if (win_sdk_version == "") {
diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn
index 7497bcb690..76de226530 100644
--- a/gn/toolchain/BUILD.gn
+++ b/gn/toolchain/BUILD.gn
@@ -34,20 +34,16 @@ toolchain("msvc") {
lib_dir_switch = "/LIBPATH:"
if (msvc == 2015) {
- bin = "$windk/VC/bin/amd64"
- env_setup = ""
- if (target_cpu == "x86") {
- bin += "_x86"
- env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
- }
+ bin = "$win_vc/bin/amd64"
} else {
- bin = "$windk/VC/Tools/MSVC/$win_toolchain_version/bin/HostX64/$target_cpu"
- env_setup = ""
- if (target_cpu == "x86") {
- print("Be sure to run")
- print("\"$windk/VC/Auxiliary/Build/vcvarsall.bat\" amd64_x86")
- print("to set up your environment before running ninja.")
- }
+ bin = "$win_vc/Tools/MSVC/$win_toolchain_version/bin/HostX64/$target_cpu"
+ }
+
+ env_setup = ""
+ if (target_cpu == "x86") {
+ # Toolchain asset includes a script that configures for x86 building.
+ # We don't support x86 builds with local MSVC installations.
+ env_setup = "cmd /c $win_sdk/bin/SetEnv.cmd /x86 && "
}
if (clang_win != "") {
diff --git a/infra/bots/assets/win_toolchain/VERSION b/infra/bots/assets/win_toolchain/VERSION
index 62f9457511..c7930257df 100644
--- a/infra/bots/assets/win_toolchain/VERSION
+++ b/infra/bots/assets/win_toolchain/VERSION
@@ -1 +1 @@
-6 \ No newline at end of file
+7 \ No newline at end of file
diff --git a/infra/bots/assets/win_toolchain_2015/VERSION b/infra/bots/assets/win_toolchain_2015/VERSION
new file mode 100644
index 0000000000..1e8b314962
--- /dev/null
+++ b/infra/bots/assets/win_toolchain_2015/VERSION
@@ -0,0 +1 @@
+6
diff --git a/infra/bots/assets/win_toolchain_2015/common.py b/infra/bots/assets/win_toolchain_2015/common.py
new file mode 100755
index 0000000000..4920c9b4fb
--- /dev/null
+++ b/infra/bots/assets/win_toolchain_2015/common.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Common vars used by scripts in this directory."""
+
+
+import os
+import sys
+
+FILE_DIR = os.path.dirname(os.path.abspath(__file__))
+INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
+
+sys.path.insert(0, INFRA_BOTS_DIR)
+from assets import assets
+
+ASSET_NAME = os.path.basename(FILE_DIR)
+
+
+def run(cmd):
+ """Run a command, eg. "upload" or "download". """
+ assets.main([cmd, ASSET_NAME] + sys.argv[1:])
diff --git a/infra/bots/assets/win_toolchain_2015/download.py b/infra/bots/assets/win_toolchain_2015/download.py
new file mode 100755
index 0000000000..96cc87d43f
--- /dev/null
+++ b/infra/bots/assets/win_toolchain_2015/download.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Download the current version of the asset."""
+
+
+import common
+
+
+if __name__ == '__main__':
+ common.run('download')
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Debug-GDI.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Debug-GDI.json
index be03a35e07..609fa0796e 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Debug-GDI.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Debug-GDI.json
@@ -20,7 +20,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-Clang-x86_64-Debug-GDI/Debug_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
index 9827284c47..038be54a44 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
@@ -20,7 +20,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-Clang-x86_64-Release-Vulkan/Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release.json
index 5ce58bafe5..28ec945aa8 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-Clang-x86_64-Release.json
@@ -20,7 +20,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-Clang-x86_64-Release/Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-MSVC-x86-Debug-Exceptions.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
index 6fa401d1b3..bf08caa1a5 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
@@ -20,7 +20,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-MSVC-x86-Debug-Exceptions/Debug",
- "--args=extra_cflags=[\"/EHsc\"] target_cpu=\"x86\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=extra_cflags=[\"/EHsc\"] target_cpu=\"x86\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All.json
index 472f328828..301fcd2878 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All.json
@@ -20,7 +20,7 @@
"[START_DIR]/skia/bin/gn.exe",
"gen",
"[START_DIR]/out/Debug_x64",
- "--args=win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[START_DIR]/skia",
"env": {
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index f018094929..62eb15ffa5 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -35,7 +35,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
linux_vulkan_sdk = str(self.m.vars.slave_dir.join('linux_vulkan_sdk'))
win_toolchain = str(self.m.vars.slave_dir.join(
't', 'depot_tools', 'win_toolchain', 'vs_files',
- 'd3cb0e37bdd120ad0ac4650b674b09e81be45616'))
+ 'a9e1098bba66d2acccc377d5ee81265910f29272'))
win_vulkan_sdk = str(self.m.vars.slave_dir.join('win_vulkan_sdk'))
cc, cxx = None, None
@@ -143,8 +143,8 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
'sanitize': sanitize,
'target_cpu': target_arch,
'target_os': 'ios' if 'iOS' in extra_config else '',
- 'windk': win_toolchain if 'Win' in os else '',
'win_sdk': win_toolchain + '/win_sdk' if 'Win' in os else '',
+ 'win_vc': win_toolchain + '/VC' if 'Win' in os else '',
}.iteritems():
if v:
args[k] = '"%s"' % v
diff --git a/infra/bots/recipes/compile.expected/Build-Win-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipes/compile.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
index ce22786f86..bc261e8990 100644
--- a/infra/bots/recipes/compile.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipes/compile.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
@@ -114,7 +114,7 @@
"[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-Clang-x86_64-Release-Vulkan\\Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]\\win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]\\win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-ANGLE.json b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-ANGLE.json
index 413228a481..37d2f5e99e 100644
--- a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-ANGLE.json
+++ b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-ANGLE.json
@@ -112,7 +112,7 @@
"[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-ANGLE\\Debug",
- "--args=skia_use_angle=true target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=skia_use_angle=true target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-Exceptions.json b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
index e0a64ffeb9..0f86d1c853 100644
--- a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
+++ b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug-Exceptions.json
@@ -112,7 +112,7 @@
"[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug-Exceptions\\Debug",
- "--args=extra_cflags=[\"/EHsc\"] target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=extra_cflags=[\"/EHsc\"] target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug.json b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug.json
index e8103ff424..ed4c248660 100644
--- a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug.json
+++ b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Debug.json
@@ -112,7 +112,7 @@
"[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug",
- "--args=target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Release-GDI.json b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Release-GDI.json
index 7c1661589e..e3f51f7e5a 100644
--- a/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Release-GDI.json
+++ b/infra/bots/recipes/compile.expected/Build-Win-MSVC-x86-Release-GDI.json
@@ -112,7 +112,7 @@
"[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GDI\\Release",
- "--args=is_debug=false target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=is_debug=false target_cpu=\"x86\" win_sdk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/alternate_repo.json b/infra/bots/recipes/compile.expected/alternate_repo.json
index 6732f130e5..0600437238 100644
--- a/infra/bots/recipes/compile.expected/alternate_repo.json
+++ b/infra/bots/recipes/compile.expected/alternate_repo.json
@@ -114,7 +114,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-Clang-x86_64-Release-Vulkan/Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipes/compile.expected/trybot.json b/infra/bots/recipes/compile.expected/trybot.json
index 62055412b1..cbdb832243 100644
--- a/infra/bots/recipes/compile.expected/trybot.json
+++ b/infra/bots/recipes/compile.expected/trybot.json
@@ -118,7 +118,7 @@
"[CUSTOM_C:\\_B_WORK]/skia/bin/gn.exe",
"gen",
"[CUSTOM_C:\\_B_WORK]/skia/out/Build-Win-Clang-x86_64-Release-Vulkan/Release_x64",
- "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616/win_sdk\" windk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
+ "--args=cc=\"clang\" clang_win=\"[START_DIR]/clang_win\" cxx=\"clang++\" is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/win_vulkan_sdk\" target_cpu=\"x86_64\" win_sdk=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/win_sdk\" win_vc=\"[START_DIR]/t/depot_tools/win_toolchain/vs_files/a9e1098bba66d2acccc377d5ee81265910f29272/VC\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]/skia",
"env": {
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 6c2a3aca00..ee7c0b3360 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -5364,7 +5364,7 @@
{
"name": "skia/bots/win_toolchain",
"path": "t",
- "version": "version:6"
+ "version": "version:7"
}
],
"dimensions": [
diff --git a/site/user/build.md b/site/user/build.md
index 4d5600579f..0cdf322b22 100644
--- a/site/user/build.md
+++ b/site/user/build.md
@@ -228,17 +228,21 @@ to the desired OS version.
Windows
-------
-Skia can build on Windows with Visual Studio 2015 Update 3, or Visual Studio
-2017 by setting `msvc = 2017` in GN. No older versions are supported. The bots
-use a packaged 2015 toolchain, which Googlers can download like this:
+Skia can build on Windows with Visual Studio 2017 or Visual Studio 2015 Update 3.
+If GN is unable to locate either of those, it will print an error message. In that
+case, you can pass your `VC` path to GN via `win_vc`.
+
+The bots use a packaged 2017 toolchain, which Googlers can download like this:
python infra/bots/assets/win_toolchain/download.py -t C:/toolchain
-If you pass that downloaded path to GN via `windk`, you can build using that
-toolchain instead of your own from Visual Studio. This toolchain is the only
-way we support 32-bit builds with 2015, by also setting `target_cpu="x86"`.
-32-bit builds should work with the default 2017 install if you follow the
-directions GN prints to set up your environment.
+You can then pass the VC and SDK paths to GN by setting your GN args:
+
+ win_vc = "C:\toolchain\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\VC"
+ win_sdk = "C:\toolchain\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\win_sdk"
+
+This toolchain is the only way we support 32-bit builds, by also setting `target_cpu="x86"`.
+There is also a corresponding 2015 toolchain, downloaded via `infra/bots/assets/win_toolchain_2015`.
### Visual Studio Solutions