Initialize intrinsics in dex2oat.
When compiling without a boot image, we used to not initialize them.
Also adjust run-test with --no-image to not pass an image to dex2oat.
Test: test.py --no-image --optimizing
Bug: 220702556
Change-Id: Ia0f26f35ee4ad24988e067c4c7c53a0acf98cf51
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index a14d386..a48d860 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -60,6 +60,7 @@
#include "noop_compiler_callbacks.h"
#include "profile/profile_compilation_info.h"
#include "runtime-inl.h"
+#include "runtime_intrinsics.h"
#include "scoped_thread_state_change-inl.h"
#include "thread.h"
#include "well_known_classes.h"
@@ -160,8 +161,10 @@
runtime_->RunRootClinits(soa.Self());
}
- // We're back in native, take the opportunity to initialize well known classes.
+ // We're back in native, take the opportunity to initialize well known classes and ensure
+ // intrinsics are initialized.
WellKnownClasses::Init(Thread::Current()->GetJniEnv());
+ InitializeIntrinsics();
// Create the heap thread pool so that the GC runs in parallel for tests. Normally, the thread
// pool is created by the runtime.