From cb62553eba82bbeac5473eeb633f95f92e43838f Mon Sep 17 00:00:00 2001 From: lwchkg Date: Mon, 18 Jan 2016 16:39:08 -0800 Subject: [PATCH] [Backport] Fix undefined GYP_MSVS_VERSION failure for non-googlers Original commit message: ------------------------ This CL adds the missing GYP_MSVS_VERSION environment variable. Without the patch the following error happen when a non-googler runs gyp_chromium in Windows. File "E:\chromium\src\tools\gyp\pylib\gyp\MSVSVersion.py", line 430, in SelectVisualStudioVersion raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be ' ValueError: GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be set to a particular version (e.g. 2010e). The discussion is found here: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/XWZ3hZW8Lco BUG=460462 Review URL: https://codereview.chromium.org/1593313002 --- build/vs_toolchain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py index 6a0e6c95e9157..66a3cd8e86401 100755 --- a/build/vs_toolchain.py +++ b/build/vs_toolchain.py @@ -71,6 +71,8 @@ def SetEnvironmentAndGetRuntimeDllDirs(): elif sys.platform == 'win32' and not depot_tools_win_toolchain: if not 'GYP_MSVS_OVERRIDE_PATH' in os.environ: os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath() + if not 'GYP_MSVS_VERSION' in os.environ: + os.environ['GYP_MSVS_VERSION'] = GetVisualStudioVersion() return vs_runtime_dll_dirs