diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-18 12:20:17 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-18 12:20:17 +0000 |
commit | 59189044f9422fc47488124ab11ece719c4ff420 (patch) | |
tree | 33605a37a0c20a48b789133e6f30ff6be3f24b43 | |
parent | 6dd1596a947021897bbf93c4ef1485df4bf16624 (diff) | |
parent | fab23c7692e37d97143c844b02ec59c0267433d5 (diff) | |
download | bazel-59189044f9422fc47488124ab11ece719c4ff420.tar.gz |
Snap for 10513376 from fab23c7692e37d97143c844b02ec59c0267433d5 to mainline-sdkext-releaseaml_sdk_341110080aml_sdk_341110000aml_sdk_341010000aml_sdk_340912010
Change-Id: Ieaeea32729ef8bdcfa0415a2b6e7567467dd9a8c
-rw-r--r-- | rules/apex/apex.bzl | 19 |
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], |