| Index: build/toolchain/win/setup_toolchain.py
|
| diff --git a/build/toolchain/win/setup_toolchain.py b/build/toolchain/win/setup_toolchain.py
|
| index a766cc1541573c8527e4c6c2efd6b72e0012177e..99585a19373b5d9c677ee41bd2d7930997b19b6b 100644
|
| --- a/build/toolchain/win/setup_toolchain.py
|
| +++ b/build/toolchain/win/setup_toolchain.py
|
| @@ -155,21 +155,23 @@ def _CopyTool(source_path):
|
|
|
|
|
| def main():
|
| - if len(sys.argv) != 6:
|
| + if len(sys.argv) != 7:
|
| print('Usage setup_toolchain.py '
|
| '<visual studio path> <win tool path> <win sdk path> '
|
| - '<runtime dirs> <target_cpu>')
|
| + '<runtime dirs> <target_cpu> <include prefix>')
|
| sys.exit(2)
|
| tool_source = sys.argv[2]
|
| win_sdk_path = sys.argv[3]
|
| runtime_dirs = sys.argv[4]
|
| target_cpu = sys.argv[5]
|
| + include_prefix = sys.argv[6]
|
|
|
| _CopyTool(tool_source)
|
|
|
| cpus = ('x86', 'x64')
|
| assert target_cpu in cpus
|
| vc_bin_dir = ''
|
| + include = ''
|
|
|
| # TODO(scottmg|goma): Do we need an equivalent of
|
| # ninja_use_custom_environment_files?
|
| @@ -184,6 +186,8 @@ def main():
|
| if os.path.exists(os.path.join(path, 'cl.exe')):
|
| vc_bin_dir = os.path.realpath(path)
|
| break
|
| + include = ' '.join([include_prefix + p
|
| + for p in env['INCLUDE'].split(';')])
|
|
|
| env_block = _FormatAsEnvironmentBlock(env)
|
| with open('environment.' + cpu, 'wb') as f:
|
| @@ -196,11 +200,14 @@ def main():
|
| env['LIBPATH'] = env['LIBPATH'].replace(r'\VC\LIB', r'\VC\LIB\STORE')
|
| env_block = _FormatAsEnvironmentBlock(env)
|
| with open('environment.winrt_' + cpu, 'wb') as f:
|
| - f.write(env_block)
|
| + f.write(env_block)
|
|
|
| assert vc_bin_dir
|
| + assert '"' not in vc_bin_dir
|
| print 'vc_bin_dir = "%s"' % vc_bin_dir
|
| -
|
| + assert include
|
| + assert '"' not in include
|
| + print 'include_flags = "%s"' % include
|
|
|
| if __name__ == '__main__':
|
| main()
|
|
|