Merge "Fix on-device paths to used libraries in dexpreopt." am: cd33e76411 am: c048d40cc9

Original change: https://android-review.googlesource.com/c/platform/build/+/1325806

Change-Id: Ic563dbd7ae789d6a7ad83a4c4dce02053aff3c83
This commit is contained in:
Ulyana Trafimovich 2020-06-11 14:23:22 +00:00 committed by Automerger Merge Worker
commit 5ed9d68b9e
2 changed files with 11 additions and 2 deletions

View file

@ -538,6 +538,14 @@ $(strip \
)
endef
###########################################################
## Convert install path to on-device path.
###########################################################
# $(1): install path
define install-path-to-on-device-path
$(patsubst $(PRODUCT_OUT)%,%,$(1))
endef
###########################################################
## The intermediates directory. Where object files go for
## a given target. We could technically get away without

View file

@ -235,8 +235,9 @@ ifdef LOCAL_DEX_PREOPT
$(call add_json_map, LibraryPaths)
$(foreach lib,$(my_dexpreopt_libs),\
$(call add_json_map, $(lib)) \
$(call add_json_str, Host, $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar) \
$(call add_json_str, Device, /system/framework/$(lib).jar) \
$(eval file := $(filter %/$(lib).jar, $(call module-installed-files,$(lib)))) \
$(call add_json_str, Host, $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar) \
$(call add_json_str, Device, $(call install-path-to-on-device-path,$(file))) \
$(call end_json_map))
$(call end_json_map)
$(call add_json_list, Archs, $(my_dexpreopt_archs))