Enable non final ids for non BusyBox builds

Non final ids is a prerequisite for using optimized shrinking and
it will soon be a hard R8 error if you pass final ids in R classes
with optimized shrinking enabled.

Bug: 325905703
Test: SystemUIGo with optimized shrinking
Change-Id: I364edc5a0b22be7b4d737c2aa470a84704d05283
This commit is contained in:
Rico Wind 2024-04-19 08:14:15 +02:00
parent c0df1afc07
commit 7152e82a42

View file

@ -417,6 +417,9 @@ func (a *aapt) buildActions(ctx android.ModuleContext, opts aaptBuildActionOptio
if a.isLibrary { if a.isLibrary {
linkFlags = append(linkFlags, "--static-lib") linkFlags = append(linkFlags, "--static-lib")
} }
if opts.forceNonFinalResourceIDs {
linkFlags = append(linkFlags, "--non-final-ids")
}
linkFlags = append(linkFlags, "--no-static-lib-packages") linkFlags = append(linkFlags, "--no-static-lib-packages")
if a.isLibrary && a.useResourceProcessorBusyBox(ctx) { if a.isLibrary && a.useResourceProcessorBusyBox(ctx) {