diff options
| -rw-r--r-- | runtime/parsed_options.cc | 5 | ||||
| -rw-r--r-- | runtime/runtime.cc | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index 44e870742c..b25a1bb90f 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -474,6 +474,11 @@ bool ParsedOptions::DoParse(const RuntimeOptions& options, LOG(INFO) << "setting boot class path to " << *args.Get(M::BootClassPath); } + if (args.GetOrDefault(M::UseJitCompilation) && args.GetOrDefault(M::Interpret)) { + Usage("-Xusejit:true and -Xint cannot be specified together"); + Exit(0); + } + // Set a default boot class path if we didn't get an explicit one via command line. if (getenv("BOOTCLASSPATH") != nullptr) { args.SetIfMissing(M::BootClassPath, std::string(getenv("BOOTCLASSPATH"))); diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 6f2ad5f18c..17b8a45b3d 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1924,9 +1924,8 @@ void Runtime::AddCurrentRuntimeFeaturesAsDex2OatArguments(std::vector<std::strin void Runtime::CreateJit() { CHECK(!IsAotCompiler()); - if (GetInstrumentation()->IsForcedInterpretOnly()) { - // Don't create JIT if forced interpret only. - return; + if (kIsDebugBuild && GetInstrumentation()->IsForcedInterpretOnly()) { + DCHECK(!jit_options_->UseJitCompilation()); } std::string error_msg; jit_.reset(jit::Jit::Create(jit_options_.get(), &error_msg)); |