commit | d6352efd1a0349a7e58ea48787009e59406ac8a8 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Mon Jun 17 21:18:00 2024 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Jun 17 21:18:00 2024 +0000 |
tree | e5abc5e422a1e449991fb254a556bfe9587fae0b | |
parent | d838795450cd7100e8855fcbc9d863a426c906ba [diff] | |
parent | ae870727b520b631fc8936b09a0eb842dbe3454a [diff] |
Merge "Use --lto-O0 for optimizeForSize targets" into main
diff --git a/cc/lto.go b/cc/lto.go index 4444152..f3af7d2 100644 --- a/cc/lto.go +++ b/cc/lto.go
@@ -110,7 +110,7 @@ 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") }