diff options
author | 2023-03-28 13:37:12 +0100 | |
---|---|---|
committer | 2023-03-31 13:32:59 +0000 | |
commit | 1aa521a994600da628a21cbe512a200f3ead920d (patch) | |
tree | 7aeb930358b4d3f29981fca2d601c2213b105ee8 /compiler/driver/compiler_options.h | |
parent | c140f19f9c50bf59d939fd8b635f9ab787ac270e (diff) |
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
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r-- | compiler/driver/compiler_options.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |