Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1471)

Unified Diff: build/toolchain/win/setup_toolchain.py

Issue 1822383002: Detect and warn on missing vcvarsall.bat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Increase indent Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/win/setup_toolchain.py
diff --git a/build/toolchain/win/setup_toolchain.py b/build/toolchain/win/setup_toolchain.py
index 4dd077cc1c1b4a8ed004d8256bcde85cbdc22b5b..f91239a43ffc5c3ca6c1ed416730f4f90de3bd41 100644
--- a/build/toolchain/win/setup_toolchain.py
+++ b/build/toolchain/win/setup_toolchain.py
@@ -117,9 +117,13 @@ def _LoadToolchainEnv(cpu, sdk_dir):
if 'GYP_MSVS_OVERRIDE_PATH' not in os.environ:
os.environ['GYP_MSVS_OVERRIDE_PATH'] = _DetectVisualStudioPath()
# We only support x64-hosted tools.
- args = [os.path.normpath(os.path.join(os.environ['GYP_MSVS_OVERRIDE_PATH'],
- 'VC/vcvarsall.bat')),
- 'amd64_x86' if cpu == 'x86' else 'amd64']
+ script_path = os.path.normpath(os.path.join(
+ os.environ['GYP_MSVS_OVERRIDE_PATH'],
scottmg 2016/03/23 19:41:53 Yeah, I wish we had a good python formatter that w
brucedawson 2016/03/23 19:48:51 Done.
+ 'VC/vcvarsall.bat'))
+ if not os.path.exists(script_path):
+ raise Exception('%s is missing - make sure VC++ tools are installed.'
+ % script_path)
scottmg 2016/03/23 19:41:53 Sorry, I should have been clearer. The binary oper
brucedawson 2016/03/23 19:48:51 Done.
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
variables = _LoadEnvFromBat(args)
return _ExtractImportantEnvironment(variables)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698