Merge "Add sh_binary dependencies to primary abi of the target" into main am: 88c21f567f

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977494

Change-Id: I4f00c169027dd886030404ab7ce00b826e204b72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Riya Thakur
2024-02-28 03:26:31 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 4 deletions

View File

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

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 {