Call shouldEmbedJnis only when needed.

Test: app_test.go
Change-Id: I4351b0ba5e1e7c89f16b4c891fcfbabb5c90c8c8
This commit is contained in:
Jaewoong Jung 2019-11-05 20:13:26 -08:00
parent af60d490ff
commit 9a9d0361bf
1 changed files with 1 additions and 2 deletions

View File

@ -165,7 +165,6 @@ func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
a.aapt.deps(ctx, sdkDep)
}
embedJni := a.shouldEmbedJnis(ctx)
for _, jniTarget := range ctx.MultiTargets() {
variation := append(jniTarget.Variations(),
blueprint.Variation{Mutator: "link", Variation: "shared"})
@ -174,7 +173,7 @@ func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
}
ctx.AddFarVariationDependencies(variation, tag, a.appProperties.Jni_libs...)
if String(a.appProperties.Stl) == "c++_shared" {
if embedJni {
if a.shouldEmbedJnis(ctx) {
ctx.AddFarVariationDependencies(variation, tag, "ndk_libc++_shared")
}
}