summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/CMakeLists.txt')
-rw-r--r--llvm/lib/Target/ARM/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/CMakeLists.txt b/llvm/lib/Target/ARM/CMakeLists.txt
index d96acb6c667..0c57a3e3166 100644
--- a/llvm/lib/Target/ARM/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/CMakeLists.txt
@@ -13,6 +13,21 @@ tablegen(LLVM ARMGenSubtargetInfo.inc -gen-subtarget)
tablegen(LLVM ARMGenDisassemblerTables.inc -gen-disassembler)
add_public_tablegen_target(ARMCommonTableGen)
+# Add GlobalISel files if the user wants to build it.
+set(GLOBAL_ISEL_FILES
+ ARMCallLowering.cpp
+ ARMInstructionSelector.cpp
+ ARMLegalizerInfo.cpp
+ ARMRegisterBankInfo.cpp
+ )
+
+if(LLVM_BUILD_GLOBAL_ISEL)
+ set(GLOBAL_ISEL_BUILD_FILES ${GLOBAL_ISEL_FILES})
+else()
+ set(GLOBAL_ISEL_BUILD_FILES "")
+ set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES})
+endif()
+
add_llvm_target(ARMCodeGen
A15SDOptimizer.cpp
ARMAsmPrinter.cpp
@@ -45,6 +60,7 @@ add_llvm_target(ARMCodeGen
Thumb2InstrInfo.cpp
Thumb2SizeReduction.cpp
ARMComputeBlockSize.cpp
+ ${GLOBAL_ISEL_BUILD_FILES}
)
add_subdirectory(TargetInfo)
OpenPOWER on IntegriCloud