Statically link the unwinder into binaries packaged into an unbundled APEX with legacy_android10_support: true.
Bug: 149075752
Test: tapas com.android.conscrypt com.android.tethering arm64
Test: m out/target/product/generic_arm64/{,symbols/}apex/com.android.{tethering,conscrypt}/lib64/libc++.so
Test: Verified that unwinder was dynamically linked to tethering's
Test: libc++ and statically linked to conscrypt's.
Test: lunch flame-userdebug && m
Test: Verified that unwinder was dynamically linked to /system/lib64/libc++.so
Change-Id: I98eed7cb4316962b19b5c12e150c224c25d0e91d
This commit is contained in:
12
apex/apex.go
12
apex/apex.go
@@ -1024,17 +1024,17 @@ func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
|
||||
// Mark the direct and transitive dependencies of apex bundles so that they
|
||||
// can be built for the apex bundles.
|
||||
func apexDepsMutator(mctx android.TopDownMutatorContext) {
|
||||
var apexBundleNames []string
|
||||
var apexBundles []android.ApexInfo
|
||||
var directDep bool
|
||||
if a, ok := mctx.Module().(*apexBundle); ok && !a.vndkApex {
|
||||
apexBundleNames = []string{mctx.ModuleName()}
|
||||
apexBundles = []android.ApexInfo{{mctx.ModuleName(), proptools.Bool(a.properties.Legacy_android10_support)}}
|
||||
directDep = true
|
||||
} else if am, ok := mctx.Module().(android.ApexModule); ok {
|
||||
apexBundleNames = am.ApexVariations()
|
||||
apexBundles = am.ApexVariations()
|
||||
directDep = false
|
||||
}
|
||||
|
||||
if len(apexBundleNames) == 0 {
|
||||
if len(apexBundles) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1042,8 +1042,8 @@ func apexDepsMutator(mctx android.TopDownMutatorContext) {
|
||||
depName := mctx.OtherModuleName(child)
|
||||
if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() &&
|
||||
(directDep || am.DepIsInSameApex(mctx, child)) {
|
||||
android.UpdateApexDependency(apexBundleNames, depName, directDep)
|
||||
am.BuildForApexes(apexBundleNames)
|
||||
android.UpdateApexDependency(apexBundles, depName, directDep)
|
||||
am.BuildForApexes(apexBundles)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user