Merge "have a per-module switch to turn the symlinking optimizaiton off"

This commit is contained in:
Jiyong Park
2020-02-20 01:47:57 +00:00
committed by Gerrit Code Review
2 changed files with 37 additions and 0 deletions

View File

@@ -1275,6 +1275,11 @@ type apexBundleProperties struct {
Legacy_android10_support *bool
IsCoverageVariant bool `blueprint:"mutated"`
// Whether this APEX is considered updatable or not. When set to true, this will enforce additional
// rules for making sure that the APEX is truely updatable. This will also disable the size optimizations
// like symlinking to the system libs. Default is false.
Updatable *bool
}
type apexTargetBundleProperties struct {
@@ -2309,6 +2314,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
a.installable() &&
!proptools.Bool(a.properties.Use_vendor)
// We don't need the optimization for updatable APEXes, as it might give false signal
// to the system health when the APEXes are still bundled (b/149805758)
if proptools.Bool(a.properties.Updatable) && a.properties.ApexType == imageApex {
a.linkToSystemLib = false
}
// prepare apex_manifest.json
a.buildManifest(ctx, provideNativeLibs, requireNativeLibs)