Chromium Code Reviews| 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) |