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

Commit 17315c2e authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Remove empty rules for check_elf_files.timestamp

If we don't have any new dependencies, or we never set up the
check_elf_files.timestamp rule, don't create an empty one now.

There were >7000 of these unused and empty rules in my AOSP
aosp_cf_x86_phone build.

This was initially brought to my attention by the new checks in
https://github.com/google/kati/pull/189

Test: diff out/build-aosp_cf_x86_phone.ninja, only removed phony rules
Change-Id: Ia43cbbd04df4a01d2182b14e3ccbe5d5ecbcabad
parent 6c044581
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ $(check_elf_files_stamp): $(my_prebuilt_src_file) $(my_check_elf_file_shared_lib
	    $<
	$(hide) touch $@

CHECK_ELF_FILES.$(check_elf_files_stamp) := 1

ifneq ($(strip $(LOCAL_CHECK_ELF_FILES)),false)
ifneq ($(strip $(BUILD_BROKEN_PREBUILT_ELF_FILES)),true)
$(LOCAL_BUILT_MODULE): $(check_elf_files_stamp)
+3 −2
Original line number Diff line number Diff line
@@ -795,9 +795,10 @@ $(foreach m,$($(if $(2),$($(1)2ND_ARCH_VAR_PREFIX))$(1)DEPENDENCIES_ON_SHARED_LI
    $($(if $(2),$($(1)2ND_ARCH_VAR_PREFIX))TARGET_OUT_INTERMEDIATES)/SHARED_LIBRARIES/%,\
    $(call module-built-files,$(mod)))))\
  \
  $(if $(r),\
  $(if $(and $(r),$(deps)),\
    $(eval stamp := $(dir $(r))check_elf_files.timestamp)\
    $(eval $(call add-elf-file-check-shared-lib,$(stamp),$(deps)))\
    $(if $(CHECK_ELF_FILES.$(stamp)),\
      $(eval $(call add-elf-file-check-shared-lib,$(stamp),$(deps))))\
  ))
endef