| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index 9583f779dfff6f1ae3a7c14f00a5c384789b2852..15957695cce3e249650b4c37aefaba63aa6c1c64 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -80,6 +80,9 @@ declare_args() {
|
| # If true, gold linker will save symbol table inside object files.
|
| # This speeds up gdb startup by 60%
|
| gdb_index = false
|
| +
|
| + # If true, optimize for size. Does not affect windows builds.
|
| + optimize_for_size = is_android || is_ios
|
| }
|
|
|
| # Apply the default logic for these values if they were not set explicitly.
|
| @@ -1209,7 +1212,7 @@ config("optimize") {
|
| # 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) {
|
| + } else if (optimize_for_size) {
|
| # Favor size over speed.
|
| cflags = [ "-Os" ] + common_optimize_on_cflags
|
| } else {
|
|
|