diff options
author | 2025-03-07 14:17:16 -0800 | |
---|---|---|
committer | 2025-03-07 14:19:53 -0800 | |
commit | 583bc3639b7a41f4f29f07f0478ee62f7b69fecb (patch) | |
tree | 2e78e6e9b4641d8b720075d167f0986f055dae03 /filesystem/android_device.go | |
parent | 4a053d74d73a4826530d1b06be8aa5ad55212ff2 (diff) |
Include kernel and dtb.img information in SBOM built in soong-only
Bug: 401366170
Bug: 401366536
Test: presubmits
Change-Id: I4a3e6834b02b6bbe2d83d90e5f0c7cc0bc2582f5
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r-- | filesystem/android_device.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go index a616ee053..931adfd43 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -294,18 +294,26 @@ func (a *androidDevice) GenerateAndroidBuildActions(ctx android.ModuleContext) { } func buildComplianceMetadata(ctx android.ModuleContext, tags ...blueprint.DependencyTag) { + // Collect metadata from deps filesContained := make([]string, 0) + prebuiltFilesCopied := make([]string, 0) for _, tag := range tags { ctx.VisitDirectDepsProxyWithTag(tag, func(m android.ModuleProxy) { if complianceMetadataInfo, ok := android.OtherModuleProvider(ctx, m, android.ComplianceMetadataProvider); ok { filesContained = append(filesContained, complianceMetadataInfo.GetFilesContained()...) + prebuiltFilesCopied = append(prebuiltFilesCopied, complianceMetadataInfo.GetPrebuiltFilesCopied()...) } }) } - sort.Strings(filesContained) - + // Merge to module's ComplianceMetadataInfo complianceMetadataInfo := ctx.ComplianceMetadataInfo() + filesContained = append(filesContained, complianceMetadataInfo.GetFilesContained()...) + sort.Strings(filesContained) complianceMetadataInfo.SetFilesContained(filesContained) + + prebuiltFilesCopied = append(prebuiltFilesCopied, complianceMetadataInfo.GetPrebuiltFilesCopied()...) + sort.Strings(prebuiltFilesCopied) + complianceMetadataInfo.SetPrebuiltFilesCopied(prebuiltFilesCopied) } // Returns a list of modules that are installed, which are collected from the dependency |