diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-12 10:22:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-12 10:22:40 +0000 |
commit | 763a08537134c14defe8a591f88846164adef0c9 (patch) | |
tree | f2610bda28e12a7783594a54e9363d2d9936179d /runtime/runtime.cc | |
parent | 7655968112fa08844f3a810bd6203fdde4d5f58f (diff) | |
parent | 1f5a90f28443886ebefcfbd531b8e41ece298cca (diff) | |
download | art-763a08537134c14defe8a591f88846164adef0c9.zip art-763a08537134c14defe8a591f88846164adef0c9.tar.gz art-763a08537134c14defe8a591f88846164adef0c9.tar.bz2 |
Merge "Add a script for running art standalone."
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 8 |
1 files changed, 7 insertions, 1 deletions
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(); |