Global ThinLTO: opt out vndk binaries as a workaround

With global ThinLTO enabled, vndk version has different symbol ordering
from the platform version. Opt out any binaries that has vndk enabled as
a temporary workaround.

Test: GLOBAL_THINLTO=true m
Bug: 169217596
Change-Id: I75b060cbe6c74421d283c6dfbd669af20f466d1f
This commit is contained in:
Yi Kong 2020-10-09 22:05:59 +08:00
parent a80b480eea
commit 134161f7e5
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ func (lto *lto) begin(ctx BaseModuleContext) {
} else if ctx.Config().IsEnvTrue("GLOBAL_THINLTO") {
staticLib := ctx.static() && !ctx.staticBinary()
hostBin := ctx.Host()
if !staticLib && !hostBin {
vndk := ctx.isVndk() // b/169217596
if !staticLib && !hostBin && !vndk {
if !lto.Never() && !lto.FullLTO() {
lto.Properties.Lto.Thin = boolPtr(true)
}