Merge changes Ic22603a5,I5330b571
* changes: Annotate dependency tags for dependencies of installed files Use the the preferred architecture symlink as the tool path if it exists
This commit is contained in:
19
java/java.go
19
java/java.go
@@ -547,6 +547,14 @@ type dependencyTag struct {
|
||||
name string
|
||||
}
|
||||
|
||||
// installDependencyTag is a dependency tag that is annotated to cause the installed files of the
|
||||
// dependency to be installed when the parent module is installed.
|
||||
type installDependencyTag struct {
|
||||
blueprint.BaseDependencyTag
|
||||
android.InstallAlwaysNeededDependencyTag
|
||||
name string
|
||||
}
|
||||
|
||||
type usesLibraryDependencyTag struct {
|
||||
dependencyTag
|
||||
sdkVersion int // SDK version in which the library appared as a standalone library.
|
||||
@@ -580,6 +588,8 @@ var (
|
||||
instrumentationForTag = dependencyTag{name: "instrumentation_for"}
|
||||
extraLintCheckTag = dependencyTag{name: "extra-lint-check"}
|
||||
jniLibTag = dependencyTag{name: "jnilib"}
|
||||
jniInstallTag = installDependencyTag{name: "jni install"}
|
||||
binaryInstallTag = installDependencyTag{name: "binary install"}
|
||||
usesLibTag = makeUsesLibraryDependencyTag(dexpreopt.AnySdkVersion)
|
||||
usesLibCompat28Tag = makeUsesLibraryDependencyTag(28)
|
||||
usesLibCompat29Tag = makeUsesLibraryDependencyTag(29)
|
||||
@@ -2550,9 +2560,12 @@ func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
if ctx.Arch().ArchType == android.Common {
|
||||
j.deps(ctx)
|
||||
} else {
|
||||
// This dependency ensures the host installation rules will install the jni libraries
|
||||
// when the wrapper is installed.
|
||||
ctx.AddVariationDependencies(nil, jniLibTag, j.binaryProperties.Jni_libs...)
|
||||
// These dependencies ensure the host installation rules will install the jar file and
|
||||
// the jni libraries when the wrapper is installed.
|
||||
ctx.AddVariationDependencies(nil, jniInstallTag, j.binaryProperties.Jni_libs...)
|
||||
ctx.AddVariationDependencies(
|
||||
[]blueprint.Variation{{Mutator: "arch", Variation: android.CommonArch.String()}},
|
||||
binaryInstallTag, ctx.ModuleName())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user