Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 406e7b72 authored by Yi Kong's avatar Yi Kong
Browse files

Turn on Global ThinLTO by default

Apply ThinLTO without optimization (--lto-O0) globally. This saves us
2.24% in binary size for system/lib64, as well as more than 4.68% build
time improvement.

Test: presubmit
Bug: 169004486
Change-Id: I1ed90c2058f9ff1fa8a2d3fd7ac1191c5d98dac1
parent 2121d16d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ func (lto *lto) Never() bool {
}

func GlobalThinLTO(ctx android.BaseModuleContext) bool {
	return ctx.Config().IsEnvTrue("GLOBAL_THINLTO")
	return !ctx.Config().IsEnvFalse("GLOBAL_THINLTO")
}

// Propagate lto requirements down from binaries