Ignore --compile-pic option for JIT.

Test: testrunner --host --pictest --jit
Bug: 33192586
Change-Id: I1e05874752c6a3b448ffbeff9681637a35acda2a
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 957ea99..5a82021 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -237,6 +237,10 @@
 
   bool ParseCompilerOption(const StringPiece& option, UsageFn Usage);
 
+  void SetNonPic() {
+    compile_pic_ = false;
+  }
+
   const std::string& GetDumpCfgFileName() const {
     return dump_cfg_file_name_;
   }
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index c099aa1..fed1f48 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -117,6 +117,9 @@
   for (const std::string& argument : Runtime::Current()->GetCompilerOptions()) {
     compiler_options_->ParseCompilerOption(argument, Usage);
   }
+  // JIT is never PIC, no matter what the runtime compiler options specify.
+  compiler_options_->SetNonPic();
+
   const InstructionSet instruction_set = kRuntimeISA;
   for (const StringPiece option : Runtime::Current()->GetCompilerOptions()) {
     VLOG(compiler) << "JIT compiler option " << option;