From 26e9307287578ca784d0b0562cbececf32412130 Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Wed, 30 May 2012 19:13:08 -0700 Subject: Make compiler_llvm target independent. To build x86 image. Change-Id: Ic013e71a3ed13d5e64d3db6551626299ff480eea --- src/compiler_llvm/compiler_llvm.cc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/compiler_llvm/compiler_llvm.cc') diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index b517d47011..6d30912ee2 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 #include -#include #include #include #include @@ -42,14 +42,6 @@ namespace llvm { 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 EnableARMLongCalls; - -// ReserveR9 is defined in llvm/lib/Target/ARM/ARMSubtarget.cpp -extern llvm::cl::opt ReserveR9; - - namespace { pthread_once_t llvm_initialized = PTHREAD_ONCE_INIT; @@ -61,11 +53,8 @@ void InitializeLLVM() { // 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(); -- cgit v1.2.3-59-g8ed1b