Loading core/base_rules.mk +13 −3 Original line number Diff line number Diff line Loading @@ -223,15 +223,25 @@ LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE) ########################################################### ## Create .toc files from shared objects to reduce unnecessary rebuild # .toc files have the list of external dynamic symbols without their addresses. # As .KATI_RESTAT is specified to .toc files and commit-change-for-toc is used, # dependent binaries of a .toc file will be rebuilt only when the content of # For ninja build, .toc files will be updated only when the content of .toc # files are changed. As .KATI_RESTAT is specified to .toc files, dependent # binaries of a .toc file will be rebuilt only when the content of # the .toc file is changed. ########################################################### ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES) LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE).toc $(LOCAL_BUILT_MODULE).toc: $(LOCAL_BUILT_MODULE) ifeq ($(BUILDING_WITH_NINJA),true) $(call $(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)transform-shared-lib-to-toc,$<,$@.tmp) $(call commit-change-for-toc,$@) $(hide) if cmp -s $@.tmp $@ ; then \ rm $@.tmp ; \ else \ mv $@.tmp $@ ; \ fi else @# make doesn't support restat. We always update .toc files so the dependents will always be updated too. $(call $(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)transform-shared-lib-to-toc,$<,$@) endif # Kati adds restat=1 to ninja. GNU make does nothing for this. .KATI_RESTAT: $(LOCAL_BUILT_MODULE).toc Loading core/config.mk +0 −4 Original line number Diff line number Diff line Loading @@ -540,10 +540,6 @@ ifndef TARGET_BUILD_APPS ZIPTIME := $(HOST_OUT_EXECUTABLES)/ziptime$(HOST_EXECUTABLE_SUFFIX) endif # ijar converts a .jar file to a smaller .jar file which only has its # interfaces. IJAR := $(HOST_OUT_EXECUTABLES)/ijar$(BUILD_EXECUTABLE_SUFFIX) # relocation packer RELOCATION_PACKER := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/relocation_packer/relocation_packer Loading core/definitions.mk +0 −36 Original line number Diff line number Diff line Loading @@ -1928,42 +1928,6 @@ define transform-jar-to-jack $(hide) rm $@.tmpjill.jack endef # Moves $1.tmp to $1 if necessary. This is designed to be used with # .KATI_RESTAT. For kati, this function doesn't update the timestamp # of $1 when $1.tmp is identical to $1 so that ninja won't rebuild # targets which depend on $1. For GNU make, this function simply # copies $1.tmp to $1. ifeq ($(BUILDING_WITH_NINJA),true) define commit-change-for-toc $(hide) if cmp -s $1.tmp $1 ; then \ rm $1.tmp ; \ else \ mv $1.tmp $1 ; \ fi endef else define commit-change-for-toc @# make doesn't support restat. We always update .toc files so the dependents will always be updated too. $(hide) mv $1.tmp $1 endef endif ## Rule to creates a table of contents from a .jar file. ## Must be called with $(eval). # $1: A .jar file define _transform-jar-to-toc $1.toc: $1 | $(IJAR) @echo Generating TOC: $$@ $(hide) $(IJAR) $$< $$@.tmp $$(call commit-change-for-toc,$$@) endef ## Define a rule which generates .jar.toc and mark it as .KATI_RESTAT. define define-jar-to-toc-rule $(eval $(call _transform-jar-to-toc,$1)) $(eval .KATI_RESTAT: $1.toc) endef # Invoke Jack to compile java from source to jack files without shrink or obfuscation. # Loading core/java.mk +0 −2 Original line number Diff line number Diff line Loading @@ -456,8 +456,6 @@ $(full_classes_jar): $(full_classes_emma_jar) | $(ACP) @echo Copying: $@ $(hide) $(ACP) -fp $< $@ $(call define-jar-to-toc-rule, $(full_classes_jar)) # Run proguard if necessary, otherwise just copy the file. ifdef LOCAL_PROGUARD_ENABLED ifneq ($(filter-out full custom nosystem obfuscation optimization shrinktests,$(LOCAL_PROGUARD_ENABLED)),) Loading core/java_common.mk +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ endif # LOCAL_SDK_VERSION full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) full_java_lib_deps := $(addsuffix .toc, $(full_java_lib_deps)) else # LOCAL_IS_HOST_MODULE Loading Loading
core/base_rules.mk +13 −3 Original line number Diff line number Diff line Loading @@ -223,15 +223,25 @@ LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE) ########################################################### ## Create .toc files from shared objects to reduce unnecessary rebuild # .toc files have the list of external dynamic symbols without their addresses. # As .KATI_RESTAT is specified to .toc files and commit-change-for-toc is used, # dependent binaries of a .toc file will be rebuilt only when the content of # For ninja build, .toc files will be updated only when the content of .toc # files are changed. As .KATI_RESTAT is specified to .toc files, dependent # binaries of a .toc file will be rebuilt only when the content of # the .toc file is changed. ########################################################### ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES) LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE).toc $(LOCAL_BUILT_MODULE).toc: $(LOCAL_BUILT_MODULE) ifeq ($(BUILDING_WITH_NINJA),true) $(call $(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)transform-shared-lib-to-toc,$<,$@.tmp) $(call commit-change-for-toc,$@) $(hide) if cmp -s $@.tmp $@ ; then \ rm $@.tmp ; \ else \ mv $@.tmp $@ ; \ fi else @# make doesn't support restat. We always update .toc files so the dependents will always be updated too. $(call $(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)transform-shared-lib-to-toc,$<,$@) endif # Kati adds restat=1 to ninja. GNU make does nothing for this. .KATI_RESTAT: $(LOCAL_BUILT_MODULE).toc Loading
core/config.mk +0 −4 Original line number Diff line number Diff line Loading @@ -540,10 +540,6 @@ ifndef TARGET_BUILD_APPS ZIPTIME := $(HOST_OUT_EXECUTABLES)/ziptime$(HOST_EXECUTABLE_SUFFIX) endif # ijar converts a .jar file to a smaller .jar file which only has its # interfaces. IJAR := $(HOST_OUT_EXECUTABLES)/ijar$(BUILD_EXECUTABLE_SUFFIX) # relocation packer RELOCATION_PACKER := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/relocation_packer/relocation_packer Loading
core/definitions.mk +0 −36 Original line number Diff line number Diff line Loading @@ -1928,42 +1928,6 @@ define transform-jar-to-jack $(hide) rm $@.tmpjill.jack endef # Moves $1.tmp to $1 if necessary. This is designed to be used with # .KATI_RESTAT. For kati, this function doesn't update the timestamp # of $1 when $1.tmp is identical to $1 so that ninja won't rebuild # targets which depend on $1. For GNU make, this function simply # copies $1.tmp to $1. ifeq ($(BUILDING_WITH_NINJA),true) define commit-change-for-toc $(hide) if cmp -s $1.tmp $1 ; then \ rm $1.tmp ; \ else \ mv $1.tmp $1 ; \ fi endef else define commit-change-for-toc @# make doesn't support restat. We always update .toc files so the dependents will always be updated too. $(hide) mv $1.tmp $1 endef endif ## Rule to creates a table of contents from a .jar file. ## Must be called with $(eval). # $1: A .jar file define _transform-jar-to-toc $1.toc: $1 | $(IJAR) @echo Generating TOC: $$@ $(hide) $(IJAR) $$< $$@.tmp $$(call commit-change-for-toc,$$@) endef ## Define a rule which generates .jar.toc and mark it as .KATI_RESTAT. define define-jar-to-toc-rule $(eval $(call _transform-jar-to-toc,$1)) $(eval .KATI_RESTAT: $1.toc) endef # Invoke Jack to compile java from source to jack files without shrink or obfuscation. # Loading
core/java.mk +0 −2 Original line number Diff line number Diff line Loading @@ -456,8 +456,6 @@ $(full_classes_jar): $(full_classes_emma_jar) | $(ACP) @echo Copying: $@ $(hide) $(ACP) -fp $< $@ $(call define-jar-to-toc-rule, $(full_classes_jar)) # Run proguard if necessary, otherwise just copy the file. ifdef LOCAL_PROGUARD_ENABLED ifneq ($(filter-out full custom nosystem obfuscation optimization shrinktests,$(LOCAL_PROGUARD_ENABLED)),) Loading
core/java_common.mk +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ endif # LOCAL_SDK_VERSION full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) full_java_lib_deps := $(addsuffix .toc, $(full_java_lib_deps)) else # LOCAL_IS_HOST_MODULE Loading