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

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

Issue 809783002: Fix ui/gl and gpu target building with GN on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove usage of system_include_dirs. Created 6 years 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/midl.gni ('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 e8826b0b821b0a28c59524a84ffacc9e3534f826..569f4da4a40f47a899a90a030a81d03fc339994d 100644
--- a/build/toolchain/win/setup_toolchain.py
+++ b/build/toolchain/win/setup_toolchain.py
@@ -135,9 +135,16 @@ def main():
vc_bin_dir = os.path.realpath(path)
break
- # TODO(scottmg|thakis|dpranke): Is there an equivalent to
- # msvs_system_include_dirs that we need to inject into INCLUDE here?
-
+ # The Windows SDK include directories must be first. They both have a sal.h,
+ # and the SDK one is newer and the SDK uses some newer features from it not
+ # present in the Visual Studio one.
+
+ if win_sdk_path:
+ additional_includes = ('{sdk_dir}\\Include\\shared;' +
+ '{sdk_dir}\\Include\\um;' +
+ '{sdk_dir}\\Include\\winrt;').format(
+ sdk_dir=win_sdk_path)
+ env['INCLUDE'] = additional_includes + env['INCLUDE']
env_block = _FormatAsEnvironmentBlock(env)
with open('environment.' + arch, 'wb') as f:
f.write(env_block)
« no previous file with comments | « build/toolchain/win/midl.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698