Add compiler type to CompilerOptions.
Let CompilerOptions hold the information whether it is AOT
or JIT compilation, or Zygote JIT for shared code.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --jit
Test: aosp_taimen-userdebug boots.
Change-Id: Id9200572406f8e43d99b8b61ef0e3edf43b52fff
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 31dbec4..632a4fb 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -55,6 +55,10 @@
UNREACHABLE();
}
}
+ // Set to appropriate JIT compiler type.
+ compiler_options_->compiler_type_ = runtime->IsZygote()
+ ? CompilerOptions::CompilerType::kSharedCodeJitCompiler
+ : CompilerOptions::CompilerType::kJitCompiler;
// JIT is never PIC, no matter what the runtime compiler options specify.
compiler_options_->SetNonPic();