diff options
author | scottmg <scottmg@chromium.org> | 2014-11-14 17:37:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-15 01:38:14 +0000 |
commit | a6675a5f1f55e66b1d6625af6225d44f5d9b0f3d (patch) | |
tree | 36a07416fac71bbac498844648a984a50ecb2162 /build | |
parent | 3184da05915b4dae75148ca6a890d86b1707f607 (diff) | |
download | chromium_src-a6675a5f1f55e66b1d6625af6225d44f5d9b0f3d.zip chromium_src-a6675a5f1f55e66b1d6625af6225d44f5d9b0f3d.tar.gz chromium_src-a6675a5f1f55e66b1d6625af6225d44f5d9b0f3d.tar.bz2 |
Update to VS2013 Update 4, and Windows SDK 8.1
- 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}
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 31 | ||||
-rw-r--r-- | build/config/win/BUILD.gn | 6 | ||||
-rwxr-xr-x | build/get_landmines.py | 1 | ||||
-rw-r--r-- | build/toolchain_vs2013.hash | 1 | ||||
-rw-r--r-- | build/vs_toolchain.py | 3 | ||||
-rwxr-xr-x | build/win_is_xtree_patched.py | 26 |
6 files changed, 53 insertions, 15 deletions
diff --git a/build/common.gypi b/build/common.gypi index 3ddb01a..30ba070 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -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)', @@ -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)', @@ -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_', ], @@ -5259,8 +5264,8 @@ ['OS=="win"', { 'target_defaults': { 'defines': [ - '_WIN32_WINNT=0x0602', - 'WINVER=0x0602', + '_WIN32_WINNT=0x0603', + 'WINVER=0x0603', 'WIN32', '_WINDOWS', 'NOMINMAX', @@ -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"', { @@ -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', @@ -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!': [ @@ -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': { diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn index 0f00a1e..51ba62a 100644 --- a/build/config/win/BUILD.gn +++ b/build/config/win/BUILD.gn @@ -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", ] @@ -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", ] } diff --git a/build/get_landmines.py b/build/get_landmines.py index 1eec5eec..2c3b3d7 100755 --- a/build/get_landmines.py +++ b/build/get_landmines.py @@ -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'): diff --git a/build/toolchain_vs2013.hash b/build/toolchain_vs2013.hash new file mode 100644 index 0000000..4ed8816 --- /dev/null +++ b/build/toolchain_vs2013.hash @@ -0,0 +1 @@ +ee7d718ec60c2dc5d255bbe325909c2021a7efef diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py index bb6d7ec..a490a2c9 100644 --- a/build/vs_toolchain.py +++ b/build/vs_toolchain.py @@ -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() diff --git a/build/win_is_xtree_patched.py b/build/win_is_xtree_patched.py new file mode 100755 index 0000000..5717322 --- /dev/null +++ b/build/win_is_xtree_patched.py @@ -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([]) |