From cc5c6a74eecb5ee1eeb56fb33134fb4fe3c5e1ef Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 28 Mar 2023 13:15:35 +0000 Subject: [PATCH] Revert "Disable dexpreopt for aosp_riscv64" This reverts commit ae7f543b7c95715f9df80671d4a89b90d48c108e. Reason for revert: Enabling dexpreopt for RISC-V (there is still no compiler support, but dex2oat runs in verification mode and does not attempt any compilation with https://r.android.com/2510739). Change-Id: I0a6d0416bec51131f0a54c7ff5b0e194728452b1 --- core/board_config.mk | 5 +---- core/dex_preopt_config.mk | 9 +++------ target/board/generic_riscv64/BoardConfig.mk | 3 --- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/core/board_config.mk b/core/board_config.mk index 16acddec9e..b1b7b81ca9 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -204,10 +204,7 @@ _board_strip_readonly_list += $(_build_broken_var_list) \ # Conditional to building on linux, as dex2oat currently does not work on darwin. ifeq ($(HOST_OS),linux) - # TODO(riscv64) add compiler support and enable dexpreopt on RISC-V. - ifneq ($(TARGET_ARCH),riscv64) - WITH_DEXPREOPT := true - endif + WITH_DEXPREOPT := true endif # ############################################################### diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk index 0bb47d10a3..e36e2ebb6f 100644 --- a/core/dex_preopt_config.mk +++ b/core/dex_preopt_config.mk @@ -65,12 +65,9 @@ ifeq ($(HOST_OS),linux) # Non eng linux builds must have preopt enabled so that system server doesn't run as interpreter # only. b/74209329 ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT))) - # TODO(riscv64) add compiler support and enable dexpreopt on RISC-V. - ifeq (,$(filter riscv64, $(TARGET_ARCH))) - ifneq (true,$(WITH_DEXPREOPT)) - ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)) - $(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds) - endif + ifneq (true,$(WITH_DEXPREOPT)) + ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)) + $(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds) endif endif endif diff --git a/target/board/generic_riscv64/BoardConfig.mk b/target/board/generic_riscv64/BoardConfig.mk index 53379bbb57..906f7f0cb5 100644 --- a/target/board/generic_riscv64/BoardConfig.mk +++ b/target/board/generic_riscv64/BoardConfig.mk @@ -26,6 +26,3 @@ include build/make/target/board/BoardConfigGsiCommon.mk # Temporary hack while prebuilt modules are missing riscv64. ALLOW_MISSING_DEPENDENCIES := true - -# Temporary until dex2oat works when targeting riscv64 -WITH_DEXPREOPT := false