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

Commit 46bd04e1 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Further optimize sbom/license metadata generation

This takes a clean `m nothing` for `cheetah-trunk_staging-userdebug`
build on my machine from 9m39s to 5m58s (average of 2 runs each).

The actual ckati run stats:
 * Wall time: 6m47s -> 3m17s
 * MaxRSS: 23627MB -> 23905MB

Bug: 406475346
Test: treehugger
Test: manual performance comparisons
Test: ninja files are identical
Change-Id: I50eaab9622df391ee6ff7eea43f8e79a1055e1ec
parent 214afcf4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1883,6 +1883,7 @@ $(foreach f,$(ALL_FLAGS_FILES),\
$(foreach f,$(ALL_ROOTDIR_SYMLINKS),\
	$(eval _is_rootdir_symlink.$(f):=Y) \
)
$(foreach m,$(ALL_NON_MODULES),$(eval _is_non_module.$(m):=Y))

$(SOONG_OUT_DIR)/compliance-metadata/$(TARGET_PRODUCT)/make-metadata.csv:
	rm -f $@
@@ -1910,7 +1911,7 @@ $(SOONG_OUT_DIR)/compliance-metadata/$(TARGET_PRODUCT)/make-metadata.csv:
	  $(eval _is_platform_generated := $(if $(_is_soong_module),,$(_is_build_prop)$(_is_notice_file)$(_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)$(_is_rootdir_symlink))) \
	  $(eval _static_libs := $(if $(_is_soong_module),,$(ALL_INSTALLED_FILES.$f.STATIC_LIBRARIES))) \
	  $(eval _whole_static_libs := $(if $(_is_soong_module),,$(ALL_INSTALLED_FILES.$f.WHOLE_STATIC_LIBRARIES))) \
	  $(eval _license_text := $(if $(filter $(_build_output_path),$(ALL_NON_MODULES)),$(ALL_NON_MODULES.$(_build_output_path).NOTICES),\
	  $(eval _license_text := $(if $(_is_non_module.$(_build_output_path)),$(ALL_NON_MODULES.$(_build_output_path).NOTICES),\
	                          $(if $(_is_partition_compat_symlink),build/soong/licenses/LICENSE))) \
	  echo '$(_build_output_path),$(_module_path),$(_is_soong_module),$(_is_prebuilt_make_module),$(_product_copy_files),$(_kernel_module_copy_files),$(_is_platform_generated),$(_static_libs),$(_whole_static_libs),$(_license_text)' >> $@; \
	)