Remove global state from apex modules
A global variant was used to store the global mapping between modules and APEXes. Replace it with storing pointers to APEX contents inside each module so that they can query the contents of any APEXes they belong to. Bug: 146393795 Test: all Soong tests Test: single line change to build.ninja host install dependency ordering Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
This commit is contained in:
@@ -445,7 +445,9 @@ func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
|
||||
// The original path becomes a symlink to the corresponding file in the
|
||||
// runtime APEX.
|
||||
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
|
||||
if android.DirectlyInAnyApex(ctx, ctx.ModuleName()) && InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() {
|
||||
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && ctx.directlyInAnyApex() &&
|
||||
!translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() {
|
||||
|
||||
if ctx.Device() && isBionic(ctx.baseModuleName()) {
|
||||
binary.installSymlinkToRuntimeApex(ctx, file)
|
||||
}
|
||||
|
Reference in New Issue
Block a user