Add sh_binary dependencies to primary abi of the target

If compile_multilib is set to 'both' for an apex having a sh_binary
dependency for which compile_multilib is not set, then the sh_binary
dependency should be added for the primary ABI of the target

Bug: 325628733,326985291
Test: m
Change-Id: Ie9cd12d49f6854c33af3724cb8e2fc3d8b7627a0
This commit is contained in:
Riya Thakur
2024-02-27 07:21:05 +00:00
parent 8bf3013844
commit 654461cde9
2 changed files with 7 additions and 4 deletions

View File

@@ -842,10 +842,12 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
} }
addDependenciesForNativeModules(ctx, deps, target, imageVariation) addDependenciesForNativeModules(ctx, deps, target, imageVariation)
ctx.AddFarVariationDependencies([]blueprint.Variation{ if isPrimaryAbi {
{Mutator: "os", Variation: target.OsVariation()}, ctx.AddFarVariationDependencies([]blueprint.Variation{
{Mutator: "arch", Variation: target.ArchVariation()}, {Mutator: "os", Variation: target.OsVariation()},
}, shBinaryTag, a.properties.Sh_binaries...) {Mutator: "arch", Variation: target.ArchVariation()},
}, shBinaryTag, a.properties.Sh_binaries...)
}
} }
// Common-arch dependencies come next // Common-arch dependencies come next

View File

@@ -5046,6 +5046,7 @@ func TestApexWithShBinary(t *testing.T) {
key: "myapex.key", key: "myapex.key",
sh_binaries: ["myscript"], sh_binaries: ["myscript"],
updatable: false, updatable: false,
compile_multilib: "both",
} }
apex_key { apex_key {