| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index 3ee4412ed255fbde3e0b94f81b767bd353851eac..9d2aedab1e459a47e04f7324abf8d5a6f55186dc 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -71,6 +71,9 @@ declare_args() {
|
| # 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 = false
|
| +
|
| + # Whether or not the official builds should be build with full WPO.
|
| + full_wpo_on_official = false
|
| }
|
|
|
| # Omit unwind support in official builds to save space.
|
| @@ -1233,12 +1236,9 @@ if (is_win) {
|
| # Default "optimization on" config.
|
| config("optimize") {
|
| if (is_win) {
|
| - # TODO(sebmarchand): Enable this once we've decided to ship with full WPO
|
| - # and when the change to the incompatible projects (FFmpeg and Yasm) have
|
| - # have been committed.
|
| - #if (is_official_build) {
|
| - # common_optimize_on_cflags += [ "/GL" ]
|
| - #}
|
| + if (is_official_build && full_wpo_on_official) {
|
| + common_optimize_on_cflags += [ "/GL" ]
|
| + }
|
|
|
| # 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.
|
|
|