Skip to content

Commit

Permalink
Update to VS2013 Update 4, and Windows SDK 8.1
Browse files Browse the repository at this point in the history
- Disable 4996 (deprecated functions in 8.1, these don't help us because we have to run on old OSs anyway)
- Simplify Bluetooth LE header hacks (these headers are buggy in 8.0 and 8.1 SDKs, but less buggy in 8.1)
- Revert attempt to centralize toolchain hashes as it didn't work well, and made it hard to roll anyway (see 400830).
- Instead of basing C4702 (unreachable code) on Pro vs. Express, check whether it's actually disabled in the xtree header
- Remove automatic calling of Express toolchain setup script. It hasn't worked well since post VS2013 RTM because of being distributed as .msp files, and the new Community edition is relatively easy to install so can subsume that usage (that being the motivation for the 4702 change above)
- goma package for u4 is pushed
- ANGLE is switched to load d3dcompiler_47 and build against 8.1 sdk, roll included here.

Xrefs:
- https://codereview.chromium.org/719343004/
- https://chromium-review.googlesource.com/#/c/229616/
- b2/18365241
- https://codereview.chromium.org/733563003/
- https://codereview.chromium.org/732673002/
- https://codereview.chromium.org/729453004/
- https://chromereviews.googleplex.com/120597013/

BUG=311488,432748,400830

Review URL: https://codereview.chromium.org/720033003

Cr-Commit-Position: refs/heads/master@{#304329}
  • Loading branch information
sgraham authored and Commit bot committed Nov 15, 2014
1 parent 3184da0 commit a6675a5
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 199 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
"angle_revision": "560eef1627abdef65f71021b906e57dc609f47fa",
"angle_revision": "e1425d95ba0ab095c5d64536bbeb3f78adcbf79f",
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling build tools
# and whatever else without interference from each other.
Expand Down
31 changes: 21 additions & 10 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,11 @@
# Experimental setting to optimize Chrome's DLLs with PGO.
'chrome_pgo_phase%': '0',

# Whether the VS xtree header has been patched to disable warning 4702. If
# it has, then we don't need to disable 4702 (unreachable code warning).
# The patch is preapplied to the internal toolchain and hence all bots.
'msvs_xtree_patched%': '<!pymod_do_main(win_is_xtree_patched)',

# Clang stuff.
'clang%': '<(clang)',
'host_clang%': '<(host_clang)',
Expand Down Expand Up @@ -1565,7 +1570,7 @@
['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
'windows_sdk_path%': '<(windows_sdk_default_path)',
}, {
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.1',
}],
['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
'directx_sdk_path%': '<(directx_sdk_default_path)',
Expand Down Expand Up @@ -2785,7 +2790,7 @@
'_SCL_SECURE_NO_DEPRECATE',
# This define is required to pull in the new Win8 interfaces from
# system headers like ShObjIdl.h.
'NTDDI_VERSION=0x06020000',
'NTDDI_VERSION=0x06030000',
# This is required for ATL to use XP-safe versions of its functions.
'_USING_V110_SDK71_',
],
Expand Down Expand Up @@ -5259,8 +5264,8 @@
['OS=="win"', {
'target_defaults': {
'defines': [
'_WIN32_WINNT=0x0602',
'WINVER=0x0602',
'_WIN32_WINNT=0x0603',
'WINVER=0x0603',
'WIN32',
'_WINDOWS',
'NOMINMAX',
Expand All @@ -5271,6 +5276,9 @@
'_ATL_NO_OPENGL',
# _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings.
'_HAS_EXCEPTIONS=0',
# Silence some warnings; we can't switch the the 'recommended'
# versions as they're not available on old OSs.
'_WINSOCK_DEPRECATED_NO_WARNINGS',
],
'conditions': [
['buildtype=="Official"', {
Expand Down Expand Up @@ -5338,6 +5346,14 @@
],
},
],
['msvs_xtree_patched!=1', {
# If xtree hasn't been patched, then we disable C4702. Otherwise,
# it's enabled. This will generally only be true for system-level
# installed Express users.
'msvs_disabled_warnings': [
4702,
],
}],
['secure_atl', {
'defines': [
'_SECURE_ATL',
Expand Down Expand Up @@ -5370,12 +5386,6 @@
},
},
},
# https://code.google.com/p/chromium/issues/detail?id=372451#c20
# Warning 4702 ("Unreachable code") should be re-enabled once
# Express users are updated to VS2013 Update 2.
'msvs_disabled_warnings': [
4702
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions!': [
Expand Down Expand Up @@ -5463,6 +5473,7 @@
4510, # Default constructor could not be generated
4512, # Assignment operator could not be generated
4610, # Object can never be instantiated
4996, # 'X': was declared deprecated (for GetVersionEx).
],
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down
6 changes: 3 additions & 3 deletions build/config/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config("sdk") {
"_ATL_NO_OPENGL",
"_WINDOWS",
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
"NTDDI_VERSION=0x06020000",
"NTDDI_VERSION=0x06030000",
"PSAPI_VERSION=1",
"WIN32",
]
Expand All @@ -35,8 +35,8 @@ config("sdk") {
# targets need to manually override it for their compiles.
config("winver") {
defines = [
"_WIN32_WINNT=0x0602",
"WINVER=0x0602",
"_WIN32_WINNT=0x0603",
"WINVER=0x0603",
]
}

Expand Down
1 change: 1 addition & 0 deletions build/get_landmines.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def print_landmines():
gyp_msvs_version().startswith('2013')):
print "Switched win from VS2010 to VS2013."
print "Update to VS2013 Update 2."
print "Update to VS2013 Update 4."
print 'Need to clobber everything due to an IDL change in r154579 (blink)'
print 'Need to clobber everything due to gen file moves in r175513 (Blink)'
if (platform() != 'ios'):
Expand Down
1 change: 1 addition & 0 deletions build/toolchain_vs2013.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ee7d718ec60c2dc5d255bbe325909c2021a7efef
3 changes: 1 addition & 2 deletions build/vs_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ def CopyDlls(target_dir, configuration, cpu_arch):
def _GetDesiredVsToolchainHashes():
"""Load a list of SHA1s corresponding to the toolchains that we want installed
to build with."""
sha1path = os.path.join(script_dir,
'..', 'buildtools', 'toolchain_vs2013.hash')
sha1path = os.path.join(script_dir, 'toolchain_vs2013.hash')
with open(sha1path, 'rb') as f:
return f.read().strip().splitlines()

Expand Down
26 changes: 26 additions & 0 deletions build/win_is_xtree_patched.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Determines if the VS xtree header has been patched to disable C4702."""

import os


def IsPatched():
# TODO(scottmg): For now, just return if we're using the packaged toolchain
# script (because we know it's patched). Another case could be added here to
# query the active VS installation and actually check the contents of xtree.
# http://crbug.com/346399.
return os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', 1) == 0


def DoMain(_):
"""Hook to be called from gyp without starting a separate python
interpreter."""
return IsPatched()


if __name__ == '__main__':
print DoMain([])
2 changes: 1 addition & 1 deletion chrome/angle.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/d3dcompiler_46.dll',
'<(PRODUCT_DIR)/d3dcompiler_47.dll',
'<(PRODUCT_DIR)/libEGL.dll',
'<(PRODUCT_DIR)/libGLESv2.dll',
],
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/mini_installer/chrome.release
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chrome.dll: %(VersionDir)s\
chrome_100_percent.pak: %(VersionDir)s\
chrome_child.dll: %(VersionDir)s\
chrome_elf.dll: %(VersionDir)s\
d3dcompiler_46.dll: %(VersionDir)s\
d3dcompiler_47.dll: %(VersionDir)s\
ffmpegsumo.dll: %(VersionDir)s\
icudt.dll: %(VersionDir)s\
icudtl.dat: %(VersionDir)s\
Expand Down
2 changes: 1 addition & 1 deletion chrome/interactive_ui_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
'variables': {
'files': [
'<(PRODUCT_DIR)/chrome_elf.dll',
'<(PRODUCT_DIR)/d3dcompiler_46.dll',
'<(PRODUCT_DIR)/d3dcompiler_47.dll',
'<(PRODUCT_DIR)/ffmpegsumo.dll',
'<(PRODUCT_DIR)/libEGL.dll',
'<(PRODUCT_DIR)/libGLESv2.dll',
Expand Down
2 changes: 1 addition & 1 deletion chrome/tools/build/win/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ FILES = [
},
# ANGLE files:
{
'filename': 'D3DCompiler_46.dll',
'filename': 'D3DCompiler_47.dll',
'buildtype': ['dev', 'official'],
},
{
Expand Down
2 changes: 1 addition & 1 deletion content/content_gl_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/d3dcompiler_46.dll',
'<(PRODUCT_DIR)/d3dcompiler_47.dll',
'<(PRODUCT_DIR)/libEGL.dll',
'<(PRODUCT_DIR)/libGLESv2.dll',
'<(PRODUCT_DIR)/ffmpegsumo.dll',
Expand Down
Loading

0 comments on commit a6675a5

Please sign in to comment.