aboutsummaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
authorRiya Thakur <riyathakur@google.com>2024-02-27 07:21:05 +0000
committerRiya Thakur <riyathakur@google.com>2024-02-27 07:23:45 +0000
commit654461cde90d833c74bca021040b75da403ac13b (patch)
tree6c6f88d8748024dae193c1e946ee72f39e25e042 /apex
parent8bf30138440a97d51f4edccdd235ae53a017a9b4 (diff)
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
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go10
-rw-r--r--apex/apex_test.go1
2 files changed, 7 insertions, 4 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 557b9b74c..c6d8234e2 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -842,10 +842,12 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
}
addDependenciesForNativeModules(ctx, deps, target, imageVariation)
- ctx.AddFarVariationDependencies([]blueprint.Variation{
- {Mutator: "os", Variation: target.OsVariation()},
- {Mutator: "arch", Variation: target.ArchVariation()},
- }, shBinaryTag, a.properties.Sh_binaries...)
+ if isPrimaryAbi {
+ ctx.AddFarVariationDependencies([]blueprint.Variation{
+ {Mutator: "os", Variation: target.OsVariation()},
+ {Mutator: "arch", Variation: target.ArchVariation()},
+ }, shBinaryTag, a.properties.Sh_binaries...)
+ }
}
// Common-arch dependencies come next
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 02dc6e60b..85d1d712a 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -5046,6 +5046,7 @@ func TestApexWithShBinary(t *testing.T) {
key: "myapex.key",
sh_binaries: ["myscript"],
updatable: false,
+ compile_multilib: "both",
}
apex_key {