diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 96160367b..de34d888e 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -11,10 +11,6 @@ else DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX) endif -# Pass special class loader context to skip the classpath and collision check. -# Should modify build system to pass used libraries properly later. -DEX2OAT_CLASS_LOADER_CONTEXT := "&" - DEX2OAT_DEPENDENCY += $(DEX2OAT) # Use the first preloaded-classes file in PRODUCT_COPY_FILES. @@ -150,7 +146,7 @@ $(hide) rm -f $(2) $(hide) mkdir -p $(dir $(2)) $(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) \ --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \ - --class-loader-context=$(DEX2OAT_CLASS_LOADER_CONTEXT) \ + --class-loader-context=$(PRIVATE_DEX2OAT_CLASS_LOADER_CONTEXT) \ --boot-image=$(PRIVATE_DEX_PREOPT_IMAGE_LOCATION) \ --dex-file=$(1) \ --dex-location=$(PRIVATE_DEX_LOCATION) \ diff --git a/core/setup_one_odex.mk b/core/setup_one_odex.mk index f0ffe81e6..e0d99264f 100644 --- a/core/setup_one_odex.mk +++ b/core/setup_one_odex.mk @@ -32,6 +32,10 @@ $(my_built_odex) : $($(my_2nd_arch_prefix)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BO $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \ $(my_dex_preopt_image_filename) +# Pass special class loader context to skip the classpath and collision check. +# Should modify build system to pass used libraries properly later. +$(my_built_odex): PRIVATE_DEX2OAT_CLASS_LOADER_CONTEXT := \& + my_installed_odex := $(call get-odex-installed-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE)) my_built_vdex := $(patsubst %.odex,%.vdex,$(my_built_odex))