Fix depfile output from dexpreopt strip script
strip.sh uses $2.d to write the depfile, while this had been passing in $@.tmp in as $2. Instead, move the file first, then use strip.sh with the real output file so that we can find the depfile. Also don't specify a depfile (or other dependencies) when LOCAL_CERTIFICATE==PRESIGNED, as we'll skip all of that in the rule in that case. Bug: 121058584 Test: NINJA_ARGS="-w missingdepfile=true" m Change-Id: I1323e775e3a6ce5a06a19d59f3fb07495f116f34
This commit is contained in:
@@ -678,8 +678,8 @@ ifneq ($(BUILD_PLATFORM_ZIP),)
|
|||||||
@# Keep a copy of apk with classes.dex unstripped
|
@# Keep a copy of apk with classes.dex unstripped
|
||||||
$(hide) cp -f $@ $(dir $@)package.dex.apk
|
$(hide) cp -f $@ $(dir $@)package.dex.apk
|
||||||
endif # BUILD_PLATFORM_ZIP
|
endif # BUILD_PLATFORM_ZIP
|
||||||
$(PRIVATE_STRIP_SCRIPT) $@ $@.tmp
|
mv -f $@ $@.tmp
|
||||||
mv -f $@.tmp $@
|
$(PRIVATE_STRIP_SCRIPT) $@.tmp $@
|
||||||
endif # LOCAL_DEX_PREOPT
|
endif # LOCAL_DEX_PREOPT
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
ifdef LOCAL_COMPRESSED_MODULE
|
ifdef LOCAL_COMPRESSED_MODULE
|
||||||
|
@@ -357,12 +357,14 @@ endif
|
|||||||
ifneq ($(BUILD_PLATFORM_ZIP),)
|
ifneq ($(BUILD_PLATFORM_ZIP),)
|
||||||
$(built_module) : .KATI_IMPLICIT_OUTPUTS := $(dir $(LOCAL_BUILT_MODULE))package.dex.apk
|
$(built_module) : .KATI_IMPLICIT_OUTPUTS := $(dir $(LOCAL_BUILT_MODULE))package.dex.apk
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
|
||||||
ifdef LOCAL_DEX_PREOPT
|
ifdef LOCAL_DEX_PREOPT
|
||||||
$(built_module) : PRIVATE_STRIP_SCRIPT := $(intermediates)/strip.sh
|
$(built_module) : PRIVATE_STRIP_SCRIPT := $(intermediates)/strip.sh
|
||||||
$(built_module) : $(intermediates)/strip.sh
|
$(built_module) : $(intermediates)/strip.sh
|
||||||
$(built_module) : | $(DEXPREOPT_GEN_DEPS)
|
$(built_module) : | $(DEXPREOPT_GEN_DEPS)
|
||||||
$(built_module) : .KATI_DEPFILE := $(built_module).d
|
$(built_module) : .KATI_DEPFILE := $(built_module).d
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(ZIP2ZIP) $(SIGNAPK_JAR)
|
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(ZIP2ZIP) $(SIGNAPK_JAR)
|
||||||
$(transform-prebuilt-to-target)
|
$(transform-prebuilt-to-target)
|
||||||
$(uncompress-prebuilt-embedded-jni-libs)
|
$(uncompress-prebuilt-embedded-jni-libs)
|
||||||
@@ -387,8 +389,8 @@ endif
|
|||||||
$(run-appcompat)
|
$(run-appcompat)
|
||||||
endif # module_run_appcompat
|
endif # module_run_appcompat
|
||||||
ifdef LOCAL_DEX_PREOPT
|
ifdef LOCAL_DEX_PREOPT
|
||||||
$(PRIVATE_STRIP_SCRIPT) $@ $@.tmp
|
mv -f $@ $@.tmp
|
||||||
mv -f $@.tmp $@
|
$(PRIVATE_STRIP_SCRIPT) $@.tmp $@
|
||||||
endif # LOCAL_DEX_PREOPT
|
endif # LOCAL_DEX_PREOPT
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
# No need for align-package because sign-package takes care of alignment
|
# No need for align-package because sign-package takes care of alignment
|
||||||
|
Reference in New Issue
Block a user