From 1aa521a994600da628a21cbe512a200f3ead920d Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Tue, 28 Mar 2023 13:37:12 +0100 Subject: riscv64: Let dex2oat run in verification mode (disable compilation). There is no compiler support for RISC-V yet, but dex2oat can perform verification and compile boot images and app images as though it was running with compiler filter "verify". This allows us to re-enable dexpreopt and speed up the first boot, as there is no need to verify all the apps on device. The change is done purely in ART by adding a workaround to turn off compilation completely on RISC-V, as opposed to setting compiler filter "verify" in the build system (e.g, we still keep compiler filter "speed-profile" for boot images in RISC-V). This approach is chosen so that fewer modifications are needed when adding compiler support. Bug: b/271573990 Test: `lunch aosp_riscv64-userdebug && m` (with cherry-picked https://r.android.com/2511036) Change-Id: If5dd798d043edc0c0ed321ad2ef5b841e68efe0f --- compiler/driver/compiler_options.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 74d081d29e..c8a41ce24b 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -115,7 +115,9 @@ class CompilerOptions final { } bool IsAnyCompilationEnabled() const { - return CompilerFilter::IsAnyCompilationEnabled(compiler_filter_); + return CompilerFilter::IsAnyCompilationEnabled(compiler_filter_) && + // TODO(riscv64): remove this when we have compiler support for RISC-V + GetInstructionSet() != InstructionSet::kRiscv64; } size_t GetHugeMethodThreshold() const { -- cgit v1.2.3-59-g8ed1b