Revert of win: Remove unneeded references to visual_studio_version now that it's always 2015. (patchset #4 id:60001 of https://codereview.chromium.org/2450933002/ )

Reason for revert:
V8 relies on this.

Original issue's description:
> win: Remove unneeded references to visual_studio_version now that it's always 2015.
>
> BUG=
>
> Committed: https://crrev.com/a628db5056deb88589224bd68dcd9ec029932c83
> Cr-Commit-Position: refs/heads/master@{#427463}

TBR=scottmg@chromium.org,thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2531333004
Cr-Original-Commit-Position: refs/heads/master@{#434945}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f89b499961b139f38e8e01282a82d4ba5d21506e
This commit is contained in:
machenbach 2016-11-29 02:21:21 -08:00 коммит произвёл Commit bot
Родитель 6cbffcdc2a
Коммит 11a223f35f
3 изменённых файлов: 44 добавлений и 26 удалений

Просмотреть файл

@ -17,6 +17,9 @@ if (current_cpu == "arm" || current_cpu == "arm64") {
if (current_cpu == "mipsel" || current_cpu == "mips64el") {
import("//build/config/mips.gni")
}
if (is_win) {
import("//build/config/win/visual_studio_version.gni")
}
if (is_mac) {
import("//build/config/mac/symbols.gni")
}
@ -909,20 +912,22 @@ config("default_warnings") {
"/wd4459",
]
cflags += [
# C4312 is a VS 2015 64-bit warning for integer to larger pointer.
# TODO(brucedawson): fix warnings, crbug.com/554200
"/wd4312",
]
if (current_cpu == "x86") {
if (visual_studio_version == "2015") {
cflags += [
# VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
# 4267. Example: short TruncTest(size_t x) { return x; }
# Since we disable 4244 we need to disable 4267 during migration.
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"/wd4267",
# C4312 is a VS 2015 64-bit warning for integer to larger pointer.
# TODO(brucedawson): fix warnings, crbug.com/554200
"/wd4312",
]
if (current_cpu == "x86") {
cflags += [
# VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
# 4267. Example: short TruncTest(size_t x) { return x; }
# Since we disable 4244 we need to disable 4267 during migration.
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"/wd4267",
]
}
}
# VS xtree header file needs to be patched or 4702 (unreachable code
@ -935,6 +940,7 @@ config("default_warnings") {
# Building with Clang on Windows is a work in progress and very
# experimental. See crbug.com/82385.
# Keep this in sync with the similar block in build/common.gypi
if (is_clang) {
cflags += [
# TODO(hans): Make this list shorter eventually, http://crbug.com/504657
@ -1544,7 +1550,7 @@ config("symbols") {
import("//build/toolchain/goma.gni")
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
if (is_win_fastlink) {
if (is_win_fastlink && visual_studio_version != "2013") {
# Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying
# it all. This flag is incompatible with /PROFILE

Просмотреть файл

@ -48,24 +48,36 @@ config("compiler") {
cflags_c = [ "/TC" ]
cflags_cc = [ "/TP" ]
cflags += [
# Tell the compiler to crash on failures. This is undocumented
# and unsupported but very handy.
"/d2FastFail",
# Flags not supported in version 2013.
if (visual_studio_version != "2013" && visual_studio_version != "2013e") {
cflags += [
# Tell the compiler to crash on failures. This is undocumented
# and unsupported but very handy.
"/d2FastFail",
]
}
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
"/Zc:sizedDealloc-",
if (visual_studio_version == "2015") {
cflags += [
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
"/Zc:sizedDealloc-",
# Disable thread-safe statics to avoid overhead and because
# they are disabled on other platforms. See crbug.com/587210
# and -fno-threadsafe-statics.
"/Zc:threadSafeInit-",
]
# Disable thread-safe statics to avoid overhead and because
# they are disabled on other platforms. See crbug.com/587210
# and -fno-threadsafe-statics.
"/Zc:threadSafeInit-",
]
}
# Building with Clang on Windows is a work in progress and very
# experimental. See crbug.com/82385.
# Keep this in sync with the similar block in build/common.gypi
if (is_clang) {
cflags += [ "-fmsc-version=1900" ]
if (visual_studio_version == "2013") {
cflags += [ "-fmsc-version=1800" ]
} else if (visual_studio_version == "2015") {
cflags += [ "-fmsc-version=1900" ]
}
if (current_cpu == "x86") {
cflags += [ "-m32" ]

Просмотреть файл

@ -9,7 +9,7 @@ declare_args() {
visual_studio_path = ""
# Version of Visual Studio pointed to by the visual_studio_path.
# Currently always "2015".
# Use "2013" for Visual Studio 2013, or "2013e" for the Express version.
visual_studio_version = ""
# Directory of the Windows driver kit. If visual_studio_path is empty, this