diff options
Diffstat (limited to 'rust/rust.go')
| -rw-r--r-- | rust/rust.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rust/rust.go b/rust/rust.go index b575c7a82..300c0f57a 100644 --- a/rust/rust.go +++ b/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"} |