|
@@ -160,7 +160,7 @@ type snapshotJsonFlags struct {
|
|
|
MinSdkVersion string `json:",omitempty"`
|
|
|
}
|
|
|
|
|
|
-var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotSingleton, ctx android.SingletonContext, snapshotArchDir string) android.Paths {
|
|
|
+var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotSingleton, ctx android.SingletonContext, snapshotArchDir string) snapshot.SnapshotPaths {
|
|
|
/*
|
|
|
Vendor snapshot zipped artifacts directory structure for cc modules:
|
|
|
{SNAPSHOT_ARCH}/
|
|
@@ -195,10 +195,10 @@ var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotS
|
|
|
*/
|
|
|
|
|
|
var snapshotOutputs android.Paths
|
|
|
+ var snapshotNotices android.Paths
|
|
|
|
|
|
includeDir := filepath.Join(snapshotArchDir, "include")
|
|
|
configsDir := filepath.Join(snapshotArchDir, "configs")
|
|
|
- noticeDir := filepath.Join(snapshotArchDir, "NOTICE_FILES")
|
|
|
|
|
|
installedNotices := make(map[string]bool)
|
|
|
installedConfigs := make(map[string]bool)
|
|
@@ -228,7 +228,7 @@ var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotS
|
|
|
prop := snapshotJsonFlags{}
|
|
|
|
|
|
// Common properties among snapshots.
|
|
|
- prop.ModuleName = ctx.ModuleName(m)
|
|
|
+ prop.InitBaseSnapshotPropsWithName(m, ctx.ModuleName(m))
|
|
|
if supportsVndkExt(s.Image) && m.IsVndkExt() {
|
|
|
// vndk exts are installed to /vendor/lib(64)?/vndk(-sp)?
|
|
|
if m.IsVndkSp() {
|
|
@@ -406,13 +406,10 @@ var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotS
|
|
|
headers = append(headers, m.SnapshotHeaders()...)
|
|
|
}
|
|
|
|
|
|
- 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.EffectiveLicenseFiles(), noticeOut))
|
|
|
+ for _, notice := range m.EffectiveLicenseFiles() {
|
|
|
+ if _, ok := installedNotices[notice.String()]; !ok {
|
|
|
+ installedNotices[notice.String()] = true
|
|
|
+ snapshotNotices = append(snapshotNotices, notice)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -422,7 +419,7 @@ var ccSnapshotAction snapshot.GenerateSnapshotAction = func(s snapshot.SnapshotS
|
|
|
snapshotOutputs = append(snapshotOutputs, copyFile(ctx, header, filepath.Join(includeDir, header.String()), s.Fake))
|
|
|
}
|
|
|
|
|
|
- return snapshotOutputs
|
|
|
+ return snapshot.SnapshotPaths{OutputFiles: snapshotOutputs, NoticeFiles: snapshotNotices}
|
|
|
}
|
|
|
|
|
|
func init() {
|