Merge "Only add deps on java_binary's jni_libs on host" into main
This commit is contained in:
@@ -1864,10 +1864,12 @@ func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
if ctx.Arch().ArchType == android.Common {
|
if ctx.Arch().ArchType == android.Common {
|
||||||
j.deps(ctx)
|
j.deps(ctx)
|
||||||
}
|
}
|
||||||
if ctx.Arch().ArchType != android.Common {
|
// These dependencies ensure the installation rules will install the jar file when the
|
||||||
// These dependencies ensure the host installation rules will install the jar file and
|
// wrapper is installed, and the jni libraries on host when the wrapper is installed.
|
||||||
// the jni libraries when the wrapper is installed.
|
if ctx.Arch().ArchType != android.Common && ctx.Os().Class == android.Host {
|
||||||
ctx.AddVariationDependencies(nil, jniInstallTag, j.binaryProperties.Jni_libs...)
|
ctx.AddVariationDependencies(nil, jniInstallTag, j.binaryProperties.Jni_libs...)
|
||||||
|
}
|
||||||
|
if ctx.Arch().ArchType != android.Common {
|
||||||
ctx.AddVariationDependencies(
|
ctx.AddVariationDependencies(
|
||||||
[]blueprint.Variation{{Mutator: "arch", Variation: android.CommonArch.String()}},
|
[]blueprint.Variation{{Mutator: "arch", Variation: android.CommonArch.String()}},
|
||||||
binaryInstallTag, ctx.ModuleName())
|
binaryInstallTag, ctx.ModuleName())
|
||||||
|
Reference in New Issue
Block a user