summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/module.go5
-rw-r--r--cc/linkable.go3
-rw-r--r--cc/vendor_snapshot.go4
3 files changed, 10 insertions, 2 deletions
diff --git a/android/module.go b/android/module.go
index 07d82f1a6..8baf799c3 100644
--- a/android/module.go
+++ b/android/module.go
@@ -473,6 +473,7 @@ type Module interface {
InitRc() Paths
VintfFragments() Paths
NoticeFiles() Paths
+ EffectiveLicenseFiles() Paths
AddProperties(props ...interface{})
GetProperties() []interface{}
@@ -1505,6 +1506,10 @@ func (m *ModuleBase) ExportedToMake() bool {
return m.commonProperties.NamespaceExportedToMake
}
+func (m *ModuleBase) EffectiveLicenseFiles() Paths {
+ return m.commonProperties.Effective_license_text
+}
+
// computeInstallDeps finds the installed paths of all dependencies that have a dependency
// tag that is annotated as needing installation via the IsInstallDepNeeded method.
func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]*installPathsDepSet, []*packagingSpecsDepSet) {
diff --git a/cc/linkable.go b/cc/linkable.go
index dd87334a3..b5777f426 100644
--- a/cc/linkable.go
+++ b/cc/linkable.go
@@ -88,6 +88,9 @@ type Snapshottable interface {
// SnapshotLibrary returns true if this module is a snapshot library.
IsSnapshotLibrary() bool
+ // EffectiveLicenseFiles returns the list of License files for this module.
+ EffectiveLicenseFiles() android.Paths
+
// SnapshotRuntimeLibs returns a list of libraries needed by this module at runtime but which aren't build dependencies.
SnapshotRuntimeLibs() []string
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index 7ba2363fc..003b7c98b 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -501,13 +501,13 @@ func (c *snapshotSingleton) GenerateBuildActions(ctx android.SingletonContext) {
headers = append(headers, m.SnapshotHeaders()...)
}
- if len(m.NoticeFiles()) > 0 {
+ if len(m.EffectiveLicenseFiles()) > 0 {
noticeName := ctx.ModuleName(m) + ".txt"
noticeOut := filepath.Join(noticeDir, noticeName)
// skip already copied notice file
if !installedNotices[noticeOut] {
installedNotices[noticeOut] = true
- snapshotOutputs = append(snapshotOutputs, combineNoticesRule(ctx, m.NoticeFiles(), noticeOut))
+ snapshotOutputs = append(snapshotOutputs, combineNoticesRule(ctx, m.EffectiveLicenseFiles(), noticeOut))
}
}
})