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

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

Issue 2728233002: win: Decide how to include system dirs at toolchain time instead of globally. (Closed)
Patch Set: Created 3 years, 10 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 | « build/toolchain/win/BUILD.gn ('k') | 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 43a7e09adf3b3988198570dfdad4285fa0b791f4..ec60564070c118bfcf4d0d9e50c295c3e8a4e94e 100644
--- a/build/toolchain/win/setup_toolchain.py
+++ b/build/toolchain/win/setup_toolchain.py
@@ -152,7 +152,7 @@ def _FormatAsEnvironmentBlock(envvar_dict):
def main():
- if len(sys.argv) != 6:
+ if len(sys.argv) != 5:
print('Usage setup_toolchain.py '
'<visual studio path> <win sdk path> '
'<runtime dirs> <target_cpu> <include prefix>')
@@ -160,7 +160,6 @@ def main():
win_sdk_path = sys.argv[2]
runtime_dirs = sys.argv[3]
target_cpu = sys.argv[4]
- include_prefix = sys.argv[5]
cpus = ('x86', 'x64')
assert target_cpu in cpus
@@ -182,8 +181,9 @@ def main():
break
# The separator for INCLUDE here must match the one used in
# _LoadToolchainEnv() above.
- include = [include_prefix + p for p in env['INCLUDE'].split(';') if p]
- include = ' '.join(['"' + i.replace('"', r'\"') + '"' for i in include])
+ include = [p.replace('"', r'\"') for p in env['INCLUDE'].split(';') if p]
+ include_I = ' '.join(['"/I' + i + '"' for i in include])
+ include_imsvc = ' '.join(['"-imsvc' + i + '"' for i in include])
env_block = _FormatAsEnvironmentBlock(env)
with open('environment.' + cpu, 'wb') as f:
@@ -200,8 +200,10 @@ def main():
assert vc_bin_dir
print 'vc_bin_dir = ' + gn_helpers.ToGNString(vc_bin_dir)
- assert include
- print 'include_flags = ' + gn_helpers.ToGNString(include)
+ assert include_I
+ print 'include_flags_I = ' + gn_helpers.ToGNString(include_I)
Nico 2017/03/03 22:17:48 this is currently not read anywhere, but if the MS
+ assert include_imsvc
+ print 'include_flags_imsvc = ' + gn_helpers.ToGNString(include_imsvc)
if __name__ == '__main__':
main()
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698