From abe2a4b7bfc559255838cbc08a60f84eb5baf046 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 10 Dec 2021 22:52:43 +0000 Subject: [PATCH] Revert "Add dependency license annotations" Revert submission 1899703 Reason for revert: b/210158272 Reverted Changes: I142c19284:Reuse license metadata files from Soong Ife89b8f23:Add dependency license annotations I8e7410837:Build license metadata files in Soong Change-Id: I51f33ae67311a3cff00d3e581d24c9a3411b7131 --- cc/cc.go | 9 --------- genrule/genrule.go | 1 - java/java.go | 37 +++++++++++-------------------------- rust/rust.go | 12 +----------- 4 files changed, 12 insertions(+), 47 deletions(-) diff --git a/cc/cc.go b/cc/cc.go index 1d5116190..113620cc1 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -682,15 +682,6 @@ func (d libraryDependencyTag) static() bool { return d.Kind == staticLibraryDependency } -func (d libraryDependencyTag) LicenseAnnotations() []android.LicenseAnnotation { - if d.shared() { - return []android.LicenseAnnotation{android.LicenseAnnotationSharedDependency} - } - return nil -} - -var _ android.LicenseAnnotationsDependencyTag = libraryDependencyTag{} - // InstallDepNeeded returns true for shared libraries so that shared library dependencies of // binaries or other shared libraries are installed as dependencies. func (d libraryDependencyTag) InstallDepNeeded() bool { diff --git a/genrule/genrule.go b/genrule/genrule.go index e7343a22d..c9bf958a3 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -110,7 +110,6 @@ type HostToolProvider interface { type hostToolDependencyTag struct { blueprint.BaseDependencyTag - android.LicenseAnnotationToolchainDependencyTag label string } type generatorProperties struct { diff --git a/java/java.go b/java/java.go index d86730943..a9f3d1a0d 100644 --- a/java/java.go +++ b/java/java.go @@ -270,9 +270,6 @@ func (j *Module) InstallBypassMake() bool { return true } type dependencyTag struct { blueprint.BaseDependencyTag name string - - // True if the dependency is relinked at runtime. - runtimeLinked bool } // installDependencyTag is a dependency tag that is annotated to cause the installed files of the @@ -283,15 +280,6 @@ type installDependencyTag struct { name string } -func (d dependencyTag) LicenseAnnotations() []android.LicenseAnnotation { - if d.runtimeLinked { - return []android.LicenseAnnotation{android.LicenseAnnotationSharedDependency} - } - return nil -} - -var _ android.LicenseAnnotationsDependencyTag = dependencyTag{} - type usesLibraryDependencyTag struct { dependencyTag @@ -308,13 +296,10 @@ type usesLibraryDependencyTag struct { func makeUsesLibraryDependencyTag(sdkVersion int, optional bool, implicit bool) usesLibraryDependencyTag { return usesLibraryDependencyTag{ - dependencyTag: dependencyTag{ - name: fmt.Sprintf("uses-library-%d", sdkVersion), - runtimeLinked: true, - }, - sdkVersion: sdkVersion, - optional: optional, - implicit: implicit, + dependencyTag: dependencyTag{name: fmt.Sprintf("uses-library-%d", sdkVersion)}, + sdkVersion: sdkVersion, + optional: optional, + implicit: implicit, } } @@ -325,22 +310,22 @@ func IsJniDepTag(depTag blueprint.DependencyTag) bool { var ( dataNativeBinsTag = dependencyTag{name: "dataNativeBins"} staticLibTag = dependencyTag{name: "staticlib"} - libTag = dependencyTag{name: "javalib", runtimeLinked: true} - java9LibTag = dependencyTag{name: "java9lib", runtimeLinked: true} + libTag = dependencyTag{name: "javalib"} + java9LibTag = dependencyTag{name: "java9lib"} pluginTag = dependencyTag{name: "plugin"} errorpronePluginTag = dependencyTag{name: "errorprone-plugin"} exportedPluginTag = dependencyTag{name: "exported-plugin"} - bootClasspathTag = dependencyTag{name: "bootclasspath", runtimeLinked: true} - systemModulesTag = dependencyTag{name: "system modules", runtimeLinked: true} + bootClasspathTag = dependencyTag{name: "bootclasspath"} + systemModulesTag = dependencyTag{name: "system modules"} frameworkResTag = dependencyTag{name: "framework-res"} - kotlinStdlibTag = dependencyTag{name: "kotlin-stdlib", runtimeLinked: true} - kotlinAnnotationsTag = dependencyTag{name: "kotlin-annotations", runtimeLinked: true} + kotlinStdlibTag = dependencyTag{name: "kotlin-stdlib"} + kotlinAnnotationsTag = dependencyTag{name: "kotlin-annotations"} kotlinPluginTag = dependencyTag{name: "kotlin-plugin"} proguardRaiseTag = dependencyTag{name: "proguard-raise"} certificateTag = dependencyTag{name: "certificate"} instrumentationForTag = dependencyTag{name: "instrumentation_for"} extraLintCheckTag = dependencyTag{name: "extra-lint-check"} - jniLibTag = dependencyTag{name: "jnilib", runtimeLinked: true} + jniLibTag = dependencyTag{name: "jnilib"} syspropPublicStubDepTag = dependencyTag{name: "sysprop public stub"} jniInstallTag = installDependencyTag{name: "jni install"} binaryInstallTag = installDependencyTag{name: "binary install"} diff --git a/rust/rust.go b/rust/rust.go index 300c0f57a..b575c7a82 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -969,7 +969,6 @@ type dependencyTag struct { name string library bool procMacro bool - dynamic bool } // InstallDepNeeded returns true for rlibs, dylibs, and proc macros so that they or their transitive @@ -980,19 +979,10 @@ func (d dependencyTag) InstallDepNeeded() bool { var _ android.InstallNeededDependencyTag = dependencyTag{} -func (d dependencyTag) LicenseAnnotations() []android.LicenseAnnotation { - if d.library && d.dynamic { - return []android.LicenseAnnotation{android.LicenseAnnotationSharedDependency} - } - return nil -} - -var _ android.LicenseAnnotationsDependencyTag = dependencyTag{} - var ( customBindgenDepTag = dependencyTag{name: "customBindgenTag"} rlibDepTag = dependencyTag{name: "rlibTag", library: true} - dylibDepTag = dependencyTag{name: "dylib", library: true, dynamic: true} + dylibDepTag = dependencyTag{name: "dylib", library: true} procMacroDepTag = dependencyTag{name: "procMacro", procMacro: true} testPerSrcDepTag = dependencyTag{name: "rust_unit_tests"} sourceDepTag = dependencyTag{name: "source"}