Use --lto-O0 for optimizeForSize targets
This is another place where we can trade performance for additional binary size savings. Test: presubmit Change-Id: Icf9600ef2ca4092e4adccc0c26465b542b038f7b
This commit is contained in:
parent
ba80e4c16b
commit
ae870727b5
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ func (lto *lto) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
var ltoLdFlags []string
|
||||
|
||||
// Do not perform costly LTO optimizations for Eng builds.
|
||||
if Bool(lto.Properties.Lto_O0) || ctx.Config().Eng() {
|
||||
if Bool(lto.Properties.Lto_O0) || ctx.optimizeForSize() || ctx.Config().Eng() {
|
||||
ltoLdFlags = append(ltoLdFlags, "-Wl,--lto-O0")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue