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 d58cb8536335647195f2945001993ade05fbd9de..0fb2a7c4b5fdf88a00d78d31234f7f90009240e9 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(';')] |
|
hans
2016/08/23 15:16:54
Should we remove empty components from the result
Nico
2016/08/23 15:23:32
Yes, we should (...but we really shouldn't have th
|
| + 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() |