diff options
author | Brian Osman <brianosman@google.com> | 2017-12-07 16:16:21 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-08 01:46:30 +0000 |
commit | 852ca318a16f9c455d2bed3efb2063dff0e4d068 (patch) | |
tree | 33a87ecf931b014864cb214ab88685683f033df7 /gn/toolchain | |
parent | 43646533fa6fb7cd6724cf00f6b8af15ac1649ea (diff) |
Updated MSVC toolchain to 2017, and further refactored GN
'windk' is no longer a thing. There are two separate variables to point
at your compiler (win_vc), and SDK (win_sdk).
'msvc' is no longer a thing, either. By default, we look for 2017 and
then 2015 (in the default locations). If neither is located, use an
assert to let users know they should set win_vc. Then, detect if win_vc
points at a 2017 or 2015 installation, and configure it automatically.
Because the toolchain is now 2017, update the GN files to handle building
x86 in that configuration. In fact, we only support x86 builds (with 2017
or 2015) using the toolchain assets. Keep a 2015 toolchain around as a
new asset, so we can add bot coverage.
Docs-Preview: https://skia.org/?cl=81841
Bug: skia:
Change-Id: I8c68a6f949e54c0e798a219450bbb9406f8dc6ac
Reviewed-on: https://skia-review.googlesource.com/81841
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'gn/toolchain')
-rw-r--r-- | gn/toolchain/BUILD.gn | 22 |
1 files changed, 9 insertions, 13 deletions
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 != "") { |