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() |