From 4b23250f4cbf3047924c646c1a0c078394f8362d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 13 Feb 2014 08:45:56 +0000 Subject: Revert "Revert "Add a script for running art standalone."" This reverts commit 41dcb9f856a2051527cd595f8fe7d200066acba4. Change-Id: Ide6fa696c6fb43fe17e0993e8c9d1b588c99b1f3 --- runtime/runtime.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/runtime.cc') 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(); -- cgit v1.1