Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2610)

Unified Diff: build/toolchain/win/setup_toolchain.py

Issue 2276513002: clang/win: Support spaces in Visual Studio directory name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also filter empty Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698