Add dependency license annotations
Add annotations to dependency tags that are dynamic or classpath linkage. Bug: 207445310 Test: m checkbuild Change-Id: Ife89b8f234aa40c380c721eda7dd18cab697fbb3
This commit is contained in:
12
rust/rust.go
12
rust/rust.go
@@ -969,6 +969,7 @@ 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
|
||||
@@ -979,10 +980,19 @@ 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}
|
||||
dylibDepTag = dependencyTag{name: "dylib", library: true, dynamic: true}
|
||||
procMacroDepTag = dependencyTag{name: "procMacro", procMacro: true}
|
||||
testPerSrcDepTag = dependencyTag{name: "rust_unit_tests"}
|
||||
sourceDepTag = dependencyTag{name: "source"}
|
||||
|
Reference in New Issue
Block a user