aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-03 22:55:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-03 22:55:22 +0000
commit9c5cdf32dfe77c4c4f743529cdcfa395917f9772 (patch)
tree33605a37a0c20a48b789133e6f30ff6be3f24b43
parent468eb92a5fcaf7d697adeb25e441ef789496810f (diff)
parentfab23c7692e37d97143c844b02ec59c0267433d5 (diff)
downloadbazel-aml_tet_341112070.tar.gz
Snap for 10605052 from fab23c7692e37d97143c844b02ec59c0267433d5 to mainline-tethering-releaseaml_tet_341112070aml_tet_341010040
Change-Id: I917a3adaedfca7691a6128ac3eb17b230c3eb684
-rw-r--r--rules/apex/apex.bzl19
1 files changed, 16 insertions, 3 deletions
diff --git a/rules/apex/apex.bzl b/rules/apex/apex.bzl
index be1cf588..d1f2e6d6 100644
--- a/rules/apex/apex.bzl
+++ b/rules/apex/apex.bzl
@@ -786,12 +786,25 @@ def _generate_sbom(ctx, file_mapping, metadata_file_mapping, apex_file):
sbom_metadata_csv = ctx.actions.declare_file(apex_filename + "-sbom-metadata.csv")
command = []
metadata_files = []
- command.append("echo installed_file,module_path,soong_module_type,is_prebuilt_make_module,product_copy_files,kernel_module_copy_files,is_platform_generated,build_output_path")
- command.append("echo %s,%s,,,,,,%s" % (apex_filename, ctx.label.package, apex_file.path))
+ sbom_metadata_csv_columns = [
+ "installed_file",
+ "module_path",
+ "soong_module_type",
+ "is_prebuilt_make_module",
+ "product_copy_files",
+ "kernel_module_copy_files",
+ "is_platform_generated",
+ "build_output_path",
+ "static_libraries",
+ "whole_static_libraries",
+ "is_static_lib",
+ ]
+ command.append("echo " + ",".join(sbom_metadata_csv_columns))
+ command.append("echo %s,%s,,,,,,%s,,," % (apex_filename, ctx.label.package, apex_file.path))
for installed_file, bazel_output_file in file_mapping.items():
if metadata_file_mapping[installed_file]:
metadata_files.append(metadata_file_mapping[installed_file])
- command.append("echo %s,%s,,,,,,%s" % (installed_file, paths.dirname(bazel_output_file.short_path), bazel_output_file.path))
+ command.append("echo %s,%s,,,,,,%s,,," % (installed_file, paths.dirname(bazel_output_file.short_path), bazel_output_file.path))
ctx.actions.run_shell(
inputs = file_mapping.values(),
outputs = [sbom_metadata_csv],