Merge "Call shouldEmbedJnis only when needed."

This commit is contained in:
Jaewoong Jung 2019-11-06 21:50:05 +00:00 committed by Gerrit Code Review
commit c6f22282ff

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")
}
}