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

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

Issue 2128993002: Windows: Fix custom toolchain args with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: build/toolchain/win/setup_toolchain.py
diff --git a/build/toolchain/win/setup_toolchain.py b/build/toolchain/win/setup_toolchain.py
index d58cb8536335647195f2945001993ade05fbd9de..fd608ba69d085a2a2626c0bc9b15d211b02fa313 100644
--- a/build/toolchain/win/setup_toolchain.py
+++ b/build/toolchain/win/setup_toolchain.py
@@ -124,11 +124,14 @@ def _LoadToolchainEnv(cpu, sdk_dir):
script_path = os.path.normpath(os.path.join(
os.environ['GYP_MSVS_OVERRIDE_PATH'],
'VC/vcvarsall.bat'))
- if not os.path.exists(script_path):
- raise Exception('%s is missing - make sure VC++ tools are installed.' %
- script_path)
- args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
- variables = _LoadEnvFromBat(args)
+ if os.path.exists(script_path):
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
+ variables = _LoadEnvFromBat(args)
+ else:
+ variables = []
brucedawson 2016/07/07 23:31:38 My only concern is that this might make some failu
+ for k in sorted(os.environ.keys()):
+ variables.append('%s=%s' % (str(k), str(os.environ[k])))
+ variables = '\n'.join(variables)
return _ExtractImportantEnvironment(variables)
« build/config/win/visual_studio_version.gni ('K') | « build/config/win/visual_studio_version.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698