Index: pylib/gyp/msvs_emulation.py |
diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py |
index 63593a424d8a792fca896b025cd8e674c438c439..713aa8936c2760d17f14925ab8c7d0159d6ef36a 100644 |
--- a/pylib/gyp/msvs_emulation.py |
+++ b/pylib/gyp/msvs_emulation.py |
@@ -897,7 +897,8 @@ def _ExtractCLPath(output_of_where): |
if line.startswith('LOC:'): |
return line[len('LOC:'):].strip() |
-def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags, open_out): |
+def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags, |
+ system_includes, open_out): |
"""It's not sufficient to have the absolute path to the compiler, linker, |
etc. on Windows, as those tools rely on .dlls being in the PATH. We also |
need to support both x86 and x64 compilers within the same build (to support |
@@ -928,6 +929,12 @@ def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags, open_out): |
args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
variables, _ = popen.communicate() |
env = _ExtractImportantEnvironment(variables) |
+ |
+ # Inject system includes from gyp files into INCLUDE. |
+ if system_includes: |
+ system_includes = system_includes | set(env.get('INCLUDE', '').split(';')) |
scottmg
2014/07/19 18:49:36
i think order should be preserved (though i'm not
Nico
2014/07/19 23:05:35
Changed everything to use OrderedDict
|
+ env['INCLUDE'] = ';'.join(system_includes) |
+ |
env_block = _FormatAsEnvironmentBlock(env) |
f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb') |
f.write(env_block) |