diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-13 08:45:56 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-13 14:36:28 +0000 |
commit | 4b23250f4cbf3047924c646c1a0c078394f8362d (patch) | |
tree | 62bae8c857c85293bcba4bf920ed47ed094e458a /runtime | |
parent | 8b8adace3511e6fd68c6ae0eb80046d68186f8eb (diff) | |
download | art-4b23250f4cbf3047924c646c1a0c078394f8362d.zip art-4b23250f4cbf3047924c646c1a0c078394f8362d.tar.gz art-4b23250f4cbf3047924c646c1a0c078394f8362d.tar.bz2 |
Revert "Revert "Add a script for running art standalone.""
This reverts commit 41dcb9f856a2051527cd595f8fe7d200066acba4.
Change-Id: Ide6fa696c6fb43fe17e0993e8c9d1b588c99b1f3
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/gc/space/image_space.cc | 2 | ||||
-rw-r--r-- | runtime/runtime.cc | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index ebad8dd..1af481d 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -286,6 +286,8 @@ OatFile* ImageSpace::OpenOatFile(std::string* error_msg) const { down_cast<mirror::String*>(image_header.GetImageRoot(ImageHeader::kOatLocation)); std::string oat_filename; oat_filename += runtime->GetHostPrefix(); + // Ensure the path ends with a '/'. + if (!oat_filename.empty()) oat_filename += "/"; oat_filename += oat_location->ToModifiedUtf8(); OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(), !Runtime::Current()->IsCompiler(), error_msg); diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 6ca45e8..d8f9ca3 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -765,6 +765,12 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b parsed->image_ += GetAndroidRoot(); parsed->image_ += "/framework/boot.art"; } + if (!kIsTargetBuild && parsed->host_prefix_.empty()) { + const char* build_top = getenv("ANDROID_BUILD_TOP"); + if (build_top != NULL) { + parsed->host_prefix_ = build_top; + } + } if (parsed->heap_growth_limit_ == 0) { parsed->heap_growth_limit_ = parsed->heap_maximum_size_; } @@ -834,7 +840,7 @@ jobject CreateSystemClassLoader() { bool Runtime::Start() { VLOG(startup) << "Runtime::Start entering"; - CHECK(host_prefix_.empty()) << host_prefix_; + CHECK(!kIsTargetBuild || host_prefix_.empty()) << host_prefix_; // Restore main thread state to kNative as expected by native code. Thread* self = Thread::Current(); |