Add option to specify compiler executable.
Change-Id: I973da5e74be5a62461caacbc708288fb95e1b99b
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index afff7a2..b9c42ee 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -563,8 +563,7 @@
const char* oat_cache_filename,
std::string* error_msg) {
Locks::mutator_lock_->AssertNotHeld(Thread::Current()); // Avoid starving GC.
- std::string dex2oat(GetAndroidRoot());
- dex2oat += (kIsDebugBuild ? "/bin/dex2oatd" : "/bin/dex2oat");
+ std::string dex2oat(Runtime::Current()->GetCompilerExecutable());
gc::Heap* heap = Runtime::Current()->GetHeap();
std::string boot_image_option("--boot-image=");