Reapply r238011 with a fix for the trap instruction.
[oota-llvm.git] / lib / Target / X86 / CMakeLists.txt
1 set(LLVM_TARGET_DEFINITIONS X86.td)
2
3 tablegen(LLVM X86GenRegisterInfo.inc -gen-register-info)
4 tablegen(LLVM X86GenDisassemblerTables.inc -gen-disassembler)
5 tablegen(LLVM X86GenInstrInfo.inc -gen-instr-info)
6 tablegen(LLVM X86GenAsmWriter.inc -gen-asm-writer)
7 tablegen(LLVM X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
8 tablegen(LLVM X86GenAsmMatcher.inc -gen-asm-matcher)
9 tablegen(LLVM X86GenDAGISel.inc -gen-dag-isel)
10 tablegen(LLVM X86GenFastISel.inc -gen-fast-isel)
11 tablegen(LLVM X86GenCallingConv.inc -gen-callingconv)
12 tablegen(LLVM X86GenSubtargetInfo.inc -gen-subtarget)
13 add_public_tablegen_target(X86CommonTableGen)
14
15 set(sources
16   X86AsmPrinter.cpp
17   X86CallFrameOptimization.cpp
18   X86ExpandPseudo.cpp
19   X86FastISel.cpp
20   X86FloatingPoint.cpp
21   X86FrameLowering.cpp
22   X86ISelDAGToDAG.cpp
23   X86ISelLowering.cpp
24   X86InstrInfo.cpp
25   X86MCInstLower.cpp
26   X86MachineFunctionInfo.cpp
27   X86PadShortFunction.cpp
28   X86RegisterInfo.cpp
29   X86SelectionDAGInfo.cpp
30   X86Subtarget.cpp
31   X86TargetMachine.cpp
32   X86TargetObjectFile.cpp
33   X86TargetTransformInfo.cpp
34   X86VZeroUpper.cpp
35   X86FixupLEAs.cpp
36   X86WinEHState.cpp
37   )
38
39 if( CMAKE_CL_64 )
40   enable_language(ASM_MASM)
41   ADD_CUSTOM_COMMAND(
42     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj
43     MAIN_DEPENDENCY X86CompilationCallback_Win64.asm
44     COMMAND ${CMAKE_ASM_MASM_COMPILER} /nologo /Fo ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/X86CompilationCallback_Win64.asm
45    )
46    set(sources ${sources} ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj)
47 endif()
48
49 add_llvm_target(X86CodeGen ${sources})
50
51 add_subdirectory(AsmParser)
52 add_subdirectory(Disassembler)
53 add_subdirectory(InstPrinter)
54 add_subdirectory(MCTargetDesc)
55 add_subdirectory(TargetInfo)
56 add_subdirectory(Utils)