diff options
Diffstat (limited to 'dex2oat/driver/compiler_driver.cc')
-rw-r--r-- | dex2oat/driver/compiler_driver.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dex2oat/driver/compiler_driver.cc b/dex2oat/driver/compiler_driver.cc index 4f851408d1..3ad696b125 100644 --- a/dex2oat/driver/compiler_driver.cc +++ b/dex2oat/driver/compiler_driver.cc @@ -2183,9 +2183,9 @@ class InitializeClassVisitor : public CompilationVisitor { // fields. Limit the max number of encoded fields. if (!klass->IsInitialized() && (is_app_image || is_boot_image || is_boot_image_extension) && - try_initialize_with_superclasses && - !too_many_encoded_fields && - compiler_options.IsImageClass(descriptor)) { + try_initialize_with_superclasses && !too_many_encoded_fields && + compiler_options.IsImageClass(descriptor) && + compiler_options.IsAotCompilationEnabled()) { bool can_init_static_fields = false; if (is_boot_image || is_boot_image_extension) { // We need to initialize static fields, we only do this for image classes that aren't |