Index: build/gyp_chromium |
diff --git a/build/gyp_chromium b/build/gyp_chromium |
index d05204b77f2b769af4a1436a45870dcb6fbb5ba9..0260c2e085c1476bbce6bab61a134ae6500d297e 100755 |
--- a/build/gyp_chromium |
+++ b/build/gyp_chromium |
@@ -397,23 +397,29 @@ if __name__ == '__main__': |
depot_tools_path = find_depot_tools.add_depot_tools_to_path() |
toolchain = os.path.normpath(os.path.join( |
depot_tools_path, 'win_toolchain', 'vs2013_files')) |
- if os.path.isdir(toolchain): |
+ version_file = os.path.join(toolchain, '.version') |
+ if os.path.isdir(toolchain) and os.path.isfile(version_file): |
os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain |
- os.environ['GYP_MSVS_VERSION'] = '2013' |
+ with open(version_file, 'r') as f: |
+ version_is_pro = f.read().strip() == 'pro' |
+ os.environ['GYP_MSVS_VERSION'] = '2013' if version_is_pro else '2013e' |
# We need to make sure windows_sdk_path is set to the automated |
# toolchain values in GYP_DEFINES, but don't want to override any other |
# values there. |
gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES')) |
win8sdk = os.path.join(toolchain, 'win8sdk') |
+ wdk = os.path.join(toolchain, 'wdk') |
gyp_defines_dict['windows_sdk_path'] = win8sdk |
os.environ['WINDOWSSDKDIR'] = win8sdk |
+ os.environ['WDK_DIR'] = wdk |
os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v))) |
for k, v in gyp_defines_dict.iteritems()) |
# Include the VS runtime in the PATH in case it's not machine-installed. |
runtime_path = ';'.join(os.path.normpath(os.path.join(toolchain, s)) |
for s in ('sys64', 'sys32')) |
os.environ['PATH'] = runtime_path + ';' + os.environ['PATH'] |
- print('Using automatic toolchain in %s.' % toolchain) |
+ print('Using automatic toolchain in %s (%s edition).' % ( |
+ toolchain, 'Pro' if version_is_pro else 'Express')) |
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check |
# to enfore syntax checking. |