Make compiler_llvm target independent. To build x86 image.
Change-Id: Ic013e71a3ed13d5e64d3db6551626299ff480eea
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index b517d47..6d30912 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -16,6 +16,7 @@
#include "compiler_llvm.h"
+#include "backend_options.h"
#include "class_linker.h"
#include "compilation_unit.h"
#include "compiled_method.h"
@@ -33,7 +34,6 @@
#include <llvm/LinkAllPasses.h>
#include <llvm/LinkAllVMCore.h>
-#include <llvm/Support/CommandLine.h>
#include <llvm/Support/ManagedStatic.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/Threading.h>
@@ -42,14 +42,6 @@
extern bool TimePassesIsEnabled;
}
-// NOTE: Although EnableARMLongCalls is defined in llvm/lib/Target/ARM/
-// ARMISelLowering.cpp, however, it is not in the llvm namespace.
-extern llvm::cl::opt<bool> EnableARMLongCalls;
-
-// ReserveR9 is defined in llvm/lib/Target/ARM/ARMSubtarget.cpp
-extern llvm::cl::opt<bool> ReserveR9;
-
-
namespace {
pthread_once_t llvm_initialized = PTHREAD_ONCE_INIT;
@@ -61,11 +53,8 @@
// NOTE: Uncomment following line to show the time consumption of LLVM passes
//llvm::TimePassesIsEnabled = true;
- // Enable -arm-reserve-r9
- ReserveR9 = true;
-
- // Enable -arm-long-calls
- EnableARMLongCalls = false;
+ // Initialize LLVM target-specific options.
+ art::compiler_llvm::InitialBackendOptions();
// Initialize LLVM target, MC subsystem, asm printer, and asm parser
llvm::InitializeAllTargets();