| 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..a766cc1541573c8527e4c6c2efd6b72e0012177e 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'],
|
| + '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)
|
| return _ExtractImportantEnvironment(variables)
|
|
|
|
|