| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index de3fac530757033122541ffe9dabbd66d81ce1b5..fb0c32cd8b3008dc6ec6e05c07f6c1d6a3d810ff 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -917,15 +917,28 @@ config("optimize_max") {
|
| cflags = common_optimize_on_cflags
|
| ldflags = common_optimize_on_ldflags
|
| if (is_win) {
|
| + cflags -= [
|
| + "/Os",
|
| + ]
|
| cflags += [
|
| "/Ot", # Favor speed over size.
|
| - "/GL", # Whole program optimization.
|
| - # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
|
| - # Probably anything that this would catch that wouldn't be caught in a
|
| - # normal build isn't going to actually be a bug, so the incremental value
|
| - # of C4702 for PGO builds is likely very small.
|
| - "/wd4702",
|
| ]
|
| + 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
|
| + # that the compile is clean.
|
| + cflags += [
|
| + "/GL", # Whole program optimization.
|
| + # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
|
| + # Probably anything that this would catch that wouldn't be caught in a
|
| + # normal build isn't going to actually be a bug, so the incremental
|
| + # value of C4702 for PGO builds is likely very small.
|
| + "/wd4702",
|
| + ]
|
| + ldflags += [
|
| + "/LTCG",
|
| + ]
|
| + }
|
| } else {
|
| cflags += [
|
| "-O2",
|
|
|