From 9b4cf433354a67ca5699c658a22e1bd630e709bd Mon Sep 17 00:00:00 2001 From: Wei Li Date: Tue, 8 Aug 2023 17:26:49 -0700 Subject: [PATCH] Include flags files in product SBOM. Bug: 272358980 Test: build/soong/tests/sbom_test.sh Change-Id: Ifcb2f26044c346c54e60d1d4fb85fc4001f64210 --- core/main.mk | 3 ++- core/packaging/flags.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/main.mk b/core/main.mk index 6c4977e8a629..b91041212d36 100644 --- a/core/main.mk +++ b/core/main.mk @@ -2195,7 +2195,8 @@ $(PRODUCT_OUT)/sbom-metadata.csv: $(installed_files) $(metadata_list) $(metadata $(eval _is_fsverity_build_manifest_apk := $(if $(findstring $f,$(ALL_FSVERITY_BUILD_MANIFEST_APK)),Y)) \ $(eval _is_linker_config := $(if $(findstring $f,$(SYSTEM_LINKER_CONFIG) $(vendor_linker_config_file)),Y)) \ $(eval _is_partition_compat_symlink := $(if $(findstring $f,$(PARTITION_COMPAT_SYMLINKS)),Y)) \ - $(eval _is_platform_generated := $(_is_build_prop)$(_is_notice_file)$(_is_dexpreopt_image_profile)$(_is_product_system_other_avbkey)$(_is_event_log_tags_file)$(_is_system_other_odex_marker)$(_is_kernel_modules_blocklist)$(_is_fsverity_build_manifest_apk)$(_is_linker_config)$(_is_partition_compat_symlink)) \ + $(eval _is_flags_file := $(if $(findstring $f, $(ALL_FLAGS_FILES)),Y)) \ + $(eval _is_platform_generated := $(_is_build_prop)$(_is_notice_file)$(_is_dexpreopt_image_profile)$(_is_product_system_other_avbkey)$(_is_event_log_tags_file)$(_is_system_other_odex_marker)$(_is_kernel_modules_blocklist)$(_is_fsverity_build_manifest_apk)$(_is_linker_config)$(_is_partition_compat_symlink)$(_is_flags_file)) \ $(eval _static_libs := $(ALL_INSTALLED_FILES.$f.STATIC_LIBRARIES)) \ $(eval _whole_static_libs := $(ALL_INSTALLED_FILES.$f.WHOLE_STATIC_LIBRARIES)) \ $(foreach l,$(_static_libs),$(eval _all_static_libs += $l:$(strip $(sort $(ALL_MODULES.$l.PATH))):$(strip $(sort $(ALL_MODULES.$l.SOONG_MODULE_TYPE))):$(ALL_STATIC_LIBRARIES.$l.BUILT_FILE))) \ diff --git a/core/packaging/flags.mk b/core/packaging/flags.mk index 4b692be46c49..cb43741c324b 100644 --- a/core/packaging/flags.mk +++ b/core/packaging/flags.mk @@ -107,6 +107,7 @@ required_flags_files := \ )) ALL_DEFAULT_INSTALLED_MODULES += $(required_flags_files) +ALL_FLAGS_FILES := $(required_flags_files) # TODO: Remove .PHONY: flag-files