From 1207c86cd6bed41385e82da56eefac4093898c3f Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 31 Aug 2017 19:24:32 -0700 Subject: [PATCH] Build: Move preopt classpath to private variable Move DEX2OAT_CLASS_LOADER_CONTEXT to PRIVATE_DEX2OAT_CLASS_LOADER_CONTEXT in preparation for actual classpaths. Bug: 65256727 Test: m Test: oatdump --oat-file=$OUT/system/framework/oat/arm64/wifi-service.odex --header-only Change-Id: I5bcfebcd3be1a187954f550dbe1d3aa1d5099052 --- core/dex_preopt_libart.mk | 6 +----- core/setup_one_odex.mk | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index aa11d1587c..1070ebefec 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 f0ffe81e62..e0d99264f0 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))