Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 9583f779dfff6f1ae3a7c14f00a5c384789b2852..33467b6ea238765b402b243b14d6069b51f628bd 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_size = false |
slan
2016/04/12 20:34:37
nit: optimize_for_size
bcf
2016/04/12 20:47:12
Done.
|
} |
# 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_size || is_android || is_ios) { |
slan
2016/04/12 20:34:37
nit: What about making this condition simply
} e
bcf
2016/04/12 20:47:12
Done.
|
# Favor size over speed. |
cflags = [ "-Os" ] + common_optimize_on_cflags |
} else { |