Revert of Revert of Sync Windows build flags between GYP and GN (patchset #1 id:1 of https://codereview.chromium.org/1185963004/)

Reason for revert:
Appears this was innocent after all.

Original issue's description:
> Revert of Sync Windows build flags between GYP and GN (patchset #4 id:60001 of https://codereview.chromium.org/1183613006/)
>
> Reason for revert:
> Speculative revert for Linux GN clobber compile failure:
>
> FAILED: python ../../remoting/webapp/build-webapp.py ...
> Traceback (most recent call last):
>   File "../../remoting/webapp/build-webapp.py", line 487, in <module>
>     sys.exit(main())
>   File "../../remoting/webapp/build-webapp.py", line 483, in main
>     return buildWebApp(**vars(args))
>   File "../../remoting/webapp/build-webapp.py", line 257, in buildWebApp
>     + buildtype + ': ' + service_environment)
> Exception: Invalid service_environment targeted for Release:
> ninja: build stopped: subcommand failed.
>
> Original issue's description:
> > Sync Windows build flags between GYP and GN
> >
> > In GN, turn on omtimize:max for base targets on all platforms, not just Android (matches GYP).
> >
> > In GN, don't duplicate /Os twice, make standard optimize = /O1 (matches GYP). Don't specify redundant optimization flags that are included as part of /O1 or /O2 (doesn't match GYP flag-wise, but should match functionality-wise).
> >
> > In GN, add a min Windows version of XP to x86 architecture binaries (matches GYP).
> >
> > In GYP, remove /GT ("EnableFiberSafeOptimizations"). This flag is super old (pre-dates GYP) and was likely turned on because it has the word "optimization" in it. It was only specified in official builds. However, according to the docs, this is making optimizations fiber safe (i.e. slower, by not caching the TLS pointer), rather than enabling optimizations for fibers. We don't use fibers so this flag is unnecessary and may be making TLS access slightly slower.
> >
> > Committed: https://crrev.com/67021f4d70fe838a5d78133bc6d5b305dfd70d72
> > Cr-Commit-Position: refs/heads/master@{#334742}
>
> TBR=scottmg@chromium.org,brettw@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/1becf72a2d1b5eec4468cc950142b083e9b24fbe
> Cr-Commit-Position: refs/heads/master@{#334782}

TBR=scottmg@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#334795}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a18ffd1f1e656bba0d905c30fad6b46ec4ffcff
This commit is contained in:
phoglund 2015-06-17 02:08:28 -07:00 коммит произвёл Commit bot
Родитель 1f5e5252af
Коммит 2c424a41e9
3 изменённых файлов: 15 добавлений и 16 удалений

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

@ -1091,12 +1091,11 @@ config("no_size_t_to_int_warning") {
# configs += [ "//build/config/compiler/optimize_max" ]
# Shared settings for both "optimize" and "optimize_max" configs.
# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
if (is_win) {
common_optimize_on_cflags = [
"/O2",
"/Ob2", # both explicit and auto inlining.
"/Oy-", # disable omitting frame pointers, must be after /o2.
"/Os", # favor size over speed.
"/Ob2", # Both explicit and auto inlining.
"/Oy-", # Disable omitting frame pointers, must be after /O2.
]
if (!is_asan) {
common_optimize_on_cflags += [
@ -1162,15 +1161,16 @@ if (is_win) {
# Default "optimization on" config. On Windows, this favors size over speed.
config("optimize") {
cflags = common_optimize_on_cflags
ldflags = common_optimize_on_ldflags
if (is_win) {
cflags += [ "/Os" ] # favor size over speed.
# Favor size over speed, /O1 must be before the common flags. The GYP
# build also specifies /Os and /GF but these are implied by /O1.
cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
} else if (is_android || is_ios) {
cflags += [ "-Os" ] # Favor size over speed.
cflags = [ "-Os" ] + common_optimize_on_cflags # Favor size over speed.
} else {
cflags += [ "-O2" ]
cflags = [ "-O2" ] + common_optimize_on_cflags
}
ldflags = common_optimize_on_ldflags
}
# Turn off optimizations.
@ -1202,11 +1202,11 @@ config("no_optimize") {
# optimization and link-time code generation which is very expensive and should
# be used sparingly.
config("optimize_max") {
cflags = common_optimize_on_cflags
ldflags = common_optimize_on_ldflags
if (is_win) {
cflags -= [ "/Os" ]
cflags += [ "/Ot" ] # Favor speed over size.
# Favor speed over size, /O2 must be before the common flags. The GYP
# build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
cflags = [ "/O2" ] + common_optimize_on_cflags
if (is_official_build) {
# TODO(GYP): TODO(dpranke): Should these only be on in an official
# build, or on all the time? For now we'll require official build so
@ -1223,7 +1223,7 @@ config("optimize_max") {
ldflags += [ "/LTCG" ]
}
} else {
cflags += [ "-O2" ]
cflags = [ "-O2" ] + common_optimize_on_cflags
}
}

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

@ -103,8 +103,8 @@ if (current_cpu == "x64") {
# 5.02 = Windows Server 2003.
subsystem_version_suffix = ",5.02"
} else {
# Don't specify a min version on x86.
subsystem_version_suffix = ""
# 5.01 = Windows XP.
subsystem_version_suffix = ",5.01"
}
config("console") {

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

@ -8,7 +8,6 @@
'VCCLCompilerTool': {
'InlineFunctionExpansion': '2',
'EnableIntrinsicFunctions': 'true',
'EnableFiberSafeOptimizations': 'true',
'OmitFramePointers': 'false',
# The above is not sufficient (http://crbug.com/106711): it
# simply eliminates an explicit "/Oy", but both /O2 and /Ox