From d5d8904e528191cb8867d29e66e7c4cd44becadf Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Wed, 8 Feb 2023 02:34:51 +0800 Subject: [PATCH] Don't disable dexpreopt for an unbundled build. Dexpreopt generates profiles that need to be installed in the APEX. Soong will skip the dex2oat step after it generates the build rule for profiles. Bug: 241823638 Test: - 1. Patch ag/20581649 PS2. 2. banchan com.android.btservices x86_64 && m 3. Check that "javalib/service-bluetooth.jar.prof" exists in the APEX. Change-Id: I5cad1b0e1027935fd78e80ad7b07e039f7b8d432 --- core/config.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/config.mk b/core/config.mk index 025a3a1de5..d016501edf 100644 --- a/core/config.mk +++ b/core/config.mk @@ -502,6 +502,10 @@ ifneq (,$(TARGET_BUILD_APPS)$(TARGET_BUILD_UNBUNDLED_IMAGE)) DISABLE_PREOPT := true endif ifeq (true,$(TARGET_BUILD_UNBUNDLED)) + # Don't disable dexpreopt for an unbundled build. Dexpreopt generates profiles that need to be + # installed in the APEX. Soong will skip the dex2oat step after it generates the build rule for + # profiles. + DISABLE_PREOPT := ifneq (true,$(UNBUNDLED_BUILD_SDKS_FROM_SOURCE)) TARGET_BUILD_USE_PREBUILT_SDKS := true endif