From d4b5b1e68920294c40dc13efb73cf7cafdd3eb36 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 10 Oct 2017 17:36:09 -0400 Subject: [PATCH] Attempt to set VCToolsInstallDir in SetEnv script. clang-cl relies on this env var being set for 2017 to find the linker. Bug: 772123 Change-Id: Id03896504d38dc706b2bd96a2c3834c6cb9db9fe TBR=brucedawson Reviewed-on: https://chromium-review.googlesource.com/709697 Commit-Queue: Nico Weber Reviewed-by: Nico Weber --- win_toolchain/package_from_installed.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/win_toolchain/package_from_installed.py b/win_toolchain/package_from_installed.py index fdf49af29..215a653e4 100644 --- a/win_toolchain/package_from_installed.py +++ b/win_toolchain/package_from_installed.py @@ -256,14 +256,17 @@ def GenerateSetEnvCmd(target_dir): ]) # Common to x86 and x64 env = collections.OrderedDict([ - # Yuck: These two have a trailing \ character. No good way to represent this - # in an OS-independent way. + # Yuck: These have a trailing \ character. No good way to represent this in + # an OS-independent way. ('VSINSTALLDIR', [['..', '..\\']]), ('VCINSTALLDIR', [['..', '..', 'VC\\']]), ('INCLUDE', include_dirs), ]) # x86. Always use amd64_x86 cross, not x86 on x86. if VS_VERSION == '2017': + env['VCToolsInstallDir'] = [['..', '..'] + vc_tools_parts[:]] + # Yuck: This one ends in a slash as well. + env['VCToolsInstallDir'][0][-1] += '\\' env_x86 = collections.OrderedDict([ ('PATH', [ ['..', '..', 'win_sdk', 'bin', WIN_VERSION, 'x64'],