Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60d24366 authored by Wei Li's avatar Wei Li Committed by Automerger Merge Worker
Browse files

Merge "Include following files in the SBOM of layoutlib, which are disted in...

Merge "Include following files in the SBOM of layoutlib, which are disted in Soong." into main am: 581b781a

Original change: https://android-review.googlesource.com/c/platform/build/+/2809912



Change-Id: I28c66a4dc0364bcb763591a90aae2f384f46c307
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 78bbac7d 581b781a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -87,6 +87,15 @@ LAYOUTLIB_SBOM := $(call intermediates-dir-for,PACKAGING,layoutlib-sbom,HOST)
_layoutlib_font_config_files := $(sort $(wildcard frameworks/base/data/fonts/*.xml))
_layoutlib_fonts_files := $(filter $(TARGET_OUT)/fonts/%.ttf $(TARGET_OUT)/fonts/%.ttc $(TARGET_OUT)/fonts/%.otf, $(INTERNAL_SYSTEMIMAGE_FILES))
_layoutlib_keyboard_files := $(sort $(wildcard frameworks/base/data/keyboards/*.kcm))

# Find out files disted with layoutlib in Soong.
### Filter out static libraries for Windows and files already handled in make.
_layoutlib_filter_out_disted := $(addprefix layoutlib_native/,fonts/% keyboards/% build.prop res.zip windows/%.a)
_layoutlib_files_disted_by_soong := \
  $(strip \
    $(foreach p,$(_all_dist_src_dst_pairs), \
      $(if $(filter-out $(_layoutlib_filter_out_disted),$(filter layoutlib_native/% layoutlib.jar,$(call word-colon,2,$p))),$p)))

$(LAYOUTLIB_SBOM)/sbom-metadata.csv:
	rm -rf $@
	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,static_libraries,whole_static_libraries,is_static_lib >> $@
@@ -107,6 +116,17 @@ $(LAYOUTLIB_SBOM)/sbom-metadata.csv:
	  echo data/keyboards/$(notdir $f),frameworks/base/data/keyboards,prebuilt_etc,,,,,$f,,, >> $@; \
	)

	$(foreach f,$(_layoutlib_files_disted_by_soong), \
	  $(eval _prebuilt_module_file := $(call word-colon,1,$f)) \
	  $(eval _dist_file := $(call word-colon,2,$f)) \
	  $(eval _dist_file := $(patsubst data/windows/%,data/win/lib64/%,$(patsubst layoutlib_native/%,data/%,$(_dist_file)))) \
	  $(eval _dist_file := $(subst layoutlib.jar,data/layoutlib.jar,$(_dist_file))) \
	  $(eval _module_name := $(strip $(foreach m,$(ALL_MODULES),$(if $(filter $(_prebuilt_module_file),$(ALL_MODULES.$m.CHECKED)),$m)))) \
	  $(eval _module_path := $(strip $(sort $(ALL_MODULES.$(_module_name).PATH)))) \
	  $(eval _soong_module_type := $(strip $(sort $(ALL_MODULES.$(_module_name).SOONG_MODULE_TYPE)))) \
	  echo $(patsubst layoutlib_native/%,%,$(_dist_file)),$(_module_path),$(_soong_module_type),,,,,$(_prebuilt_module_file),,, >> $@; \
	)

	$(foreach f,$(LAYOUTLIB_RES_FILES), \
	  $(eval _path := $(subst frameworks/base/core/res,data,$f)) \
	  echo $(_path),,,,,,Y,$f,,, >> $@; \