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

Commit 1ef0a635 authored by Ying Wang's avatar Ying Wang
Browse files

Fix pattern rules for $(installed_odex) for libdvm.

When the VM is libdvm, we don't put the odex files in an arch specific
subdirectory. The previous pattern rules don't work because of the extra
"/". With this change, % evaluates to empty string when it's built for
libdvm; % evaluates to "<arch_name>/" when it's built for libart.
Also removed use of $(create-empty-package), which may causes file name
(dummy) conflict with the rule of package.apk.

Bug: 15311527

(cherry picked from commit 994c226b)

Change-Id: I5469ef1994f2ba91a9c25126349156752fc35b4b
parent 7e127ebe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -123,8 +123,8 @@ endif # boot jar
ifdef built_odex
# Use pattern rule - we may have multiple installed odex files.
# Ugly syntax - See the definition get-odex-file-path.
$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%/$(notdir $(word 1,$(installed_odex))) \
                  : $(dir $(LOCAL_BUILT_MODULE))%/$(notdir $(word 1,$(built_odex))) \
$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%$(notdir $(word 1,$(installed_odex))) \
                  : $(dir $(LOCAL_BUILT_MODULE))%$(notdir $(word 1,$(built_odex))) \
    | $(ACP)
	@echo "Install: $@"
	$(copy-file-to-target)
+1 −1
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ endif
ifdef LOCAL_DEX_PREOPT
$(built_odex): PRIVATE_DEX_FILE := $(built_dex)
$(built_odex) : $(built_dex)
	$(create-empty-package)
	$(hide) mkdir -p $(dir $@) && rm -f $@
	$(add-dex-to-package)
	$(hide) mv $@ $@.input
	$(call dexpreopt-one-file,$@.input,$@)