blob: 175c2adf9de859d57e212ae0ed077b4bc0badc7f [file] [log] [blame]
Clement Courbet44b4c542018-06-19 11:28:59 +00001if (LLVM_TARGETS_TO_BUILD MATCHES "X86")
2 add_subdirectory(X86)
John Brawn346856d2018-07-02 13:53:46 +00003 set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} X86" PARENT_SCOPE)
Clement Courbet44b4c542018-06-19 11:28:59 +00004endif()
John Brawnc4ed6002018-07-03 10:10:29 +00005if (LLVM_TARGETS_TO_BUILD MATCHES "AArch64")
6 add_subdirectory(AArch64)
7 set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} AArch64" PARENT_SCOPE)
8endif()
Clement Courbet44b4c542018-06-19 11:28:59 +00009
Clement Courbetac74acd2018-04-04 11:37:06 +000010add_library(LLVMExegesis
11 STATIC
Clement Courbet37f0ca02018-05-15 12:08:00 +000012 Analysis.cpp
Clement Courbet0e69e2d2018-05-17 10:52:18 +000013 Assembler.cpp
Clement Courbetac74acd2018-04-04 11:37:06 +000014 BenchmarkResult.cpp
15 BenchmarkRunner.cpp
Clement Courbet96715412018-05-07 09:09:48 +000016 Clustering.cpp
Clement Courbetac74acd2018-04-04 11:37:06 +000017 Latency.cpp
18 LlvmState.cpp
Clement Courbet0e69e2d2018-05-17 10:52:18 +000019 MCInstrDescView.cpp
Clement Courbetac74acd2018-04-04 11:37:06 +000020 PerfHelper.cpp
Clement Courbet0e69e2d2018-05-17 10:52:18 +000021 RegisterAliasing.cpp
Clement Courbet44b4c542018-06-19 11:28:59 +000022 Target.cpp
Clement Courbetac74acd2018-04-04 11:37:06 +000023 Uops.cpp
Clement Courbetac74acd2018-04-04 11:37:06 +000024 )
25
26llvm_update_compile_flags(LLVMExegesis)
27llvm_map_components_to_libnames(libs
Clement Courbet908dd382018-04-04 12:58:41 +000028 Analysis
Clement Courbetac74acd2018-04-04 11:37:06 +000029 CodeGen
Clement Courbet908dd382018-04-04 12:58:41 +000030 Core
Clement Courbetac74acd2018-04-04 11:37:06 +000031 ExecutionEngine
Clement Courbet559d1e32018-05-15 07:40:21 +000032 GlobalISel
Clement Courbetac74acd2018-04-04 11:37:06 +000033 MC
Clement Courbet4273e1e2018-06-15 07:30:45 +000034 MCDisassembler
Clement Courbetac74acd2018-04-04 11:37:06 +000035 MCJIT
Clement Courbet908dd382018-04-04 12:58:41 +000036 Object
Clement Courbet4273e1e2018-06-15 07:30:45 +000037 ObjectYAML
Clement Courbetac74acd2018-04-04 11:37:06 +000038 Support
39 )
40
Guillaume Chatelet07828812018-06-12 13:07:16 +000041if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
42 list(APPEND libs pfm)
43endif()
44
Clement Courbetac74acd2018-04-04 11:37:06 +000045target_link_libraries(LLVMExegesis ${libs})
46set_target_properties(LLVMExegesis PROPERTIES FOLDER "Libraries")