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

Commit 3b5e4ca7 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by android-build-merger
Browse files

Merge "Use the final APK for dexpreopt when it's not stripped."

am: 923f267b

Change-Id: I42a4e62034c14fcdecb35f5baff4cb13b1146e19
parents a9ead89c 923f267b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -67,9 +67,18 @@ ifneq ($(BUILD_PLATFORM_ZIP),)
endif

ifdef LOCAL_DEX_PREOPT
ifdef LOCAL_STRIP_DEX
  # If we have stripped the final APK, use the original jar generated by soong.
  $(built_odex): $(LOCAL_SOONG_DEX_JAR)
	$(call dexpreopt-one-file,$<,$@)
  $(eval $(call dexpreopt-copy-jar,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE),$(LOCAL_STRIP_DEX)))
else
  # If we haven't stripped, use the final APK for dexpreopt, as this may affect how the dex
  # code is compiled.
  $(built_odex): $(LOCAL_PREBUILT_MODULE_FILE)
	$(call dexpreopt-one-file,$<,$@)
  $(eval $(call dexpreopt-copy-jar,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE),$(LOCAL_STRIP_DEX)))
endif  # LOCAL_STRIP_DEX
else
  $(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
endif