am 08d7d44b: Fix image generation.
* commit '08d7d44bc33a7251ff34287422c7751c5a65683d':
Fix image generation.
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index be39a58..4862c0a 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -56,10 +56,9 @@
std::vector<std::string> arg_vector;
- const char* dex2oat = GetAndroidRoot();
- std::string dex2oat_string(dex2oat);
- dex2oat_string += (kIsDebugBuild ? "/bin/dex2oatd" : "/bin/dex2oat");
- arg_vector.push_back(dex2oat_string);
+ std::string dex2oat = GetAndroidRoot();
+ dex2oat += (kIsDebugBuild ? "/bin/dex2oatd" : "/bin/dex2oat");
+ arg_vector.push_back(dex2oat);
std::string image_option_string("--image=");
image_option_string += image_file_name;
@@ -109,7 +108,7 @@
// change process groups, so we don't get reaped by ProcessManager
setpgid(0, 0);
- execv(dex2oat, &char_args[0]);
+ execv(dex2oat.c_str(), &char_args[0]);
PLOG(FATAL) << "execv(" << dex2oat << ") failed";
return false;