| 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..0d0975dfe3a6444719fea252becfd87b37448069 100644
|
| --- a/build/toolchain/win/setup_toolchain.py
|
| +++ b/build/toolchain/win/setup_toolchain.py
|
| @@ -17,6 +17,9 @@ import re
|
| import subprocess
|
| import sys
|
|
|
| +sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
| +import gn_helpers
|
| +
|
| SCRIPT_DIR = os.path.dirname(__file__)
|
|
|
| def _ExtractImportantEnvironment(output_of_set):
|
| @@ -204,8 +207,8 @@ def main():
|
| break
|
| # The separator for INCLUDE here must match the one used in
|
| # _LoadToolchainEnv() above.
|
| - include = ' '.join([include_prefix + p
|
| - for p in env['INCLUDE'].split(';')])
|
| + include = [include_prefix + p for p in env['INCLUDE'].split(';') if p]
|
| + include = ' '.join(['"' + i.replace('"', r'\"') + '"' for i in include])
|
|
|
| env_block = _FormatAsEnvironmentBlock(env)
|
| with open('environment.' + cpu, 'wb') as f:
|
| @@ -221,11 +224,9 @@ def main():
|
| f.write(env_block)
|
|
|
| assert vc_bin_dir
|
| - assert '"' not in vc_bin_dir
|
| - print 'vc_bin_dir = "%s"' % vc_bin_dir
|
| + print 'vc_bin_dir = ' + gn_helpers.ToGNString(vc_bin_dir)
|
| assert include
|
| - assert '"' not in include
|
| - print 'include_flags = "%s"' % include
|
| + print 'include_flags = ' + gn_helpers.ToGNString(include)
|
|
|
| if __name__ == '__main__':
|
| main()
|
|
|