[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / tools / llvm-exegesis / CMakeLists.txt
blobf1e17844c48605a76f521bc62e2a0097cf30e143
1 set(LLVM_LINK_COMPONENTS
2   MC
3   MCParser
4   Support
5   native
6   )
8 add_llvm_tool(llvm-exegesis
9   DISABLE_LLVM_LINK_LLVM_DYLIB
10   llvm-exegesis.cpp
12   DEPENDS
13   intrinsics_gen
14   )
16 add_subdirectory(lib)
18 # Link the native exegesis target if compiled and on the right host.
19 if ((LLVM_TARGETS_TO_BUILD MATCHES "${LLVM_NATIVE_ARCH}") AND (LLVM_EXEGESIS_TARGETS MATCHES "${LLVM_NATIVE_ARCH}"))
20   set(LLVM_EXEGESIS_NATIVE_ARCH "${LLVM_NATIVE_ARCH}")
21 endif()
23 if (LLVM_EXEGESIS_NATIVE_ARCH)
24   set(LLVM_EXEGESIS_NATIVE_TARGET "LLVMExegesis${LLVM_EXEGESIS_NATIVE_ARCH}")
25   set_source_files_properties(llvm-exegesis.cpp PROPERTIES COMPILE_FLAGS "-DLLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET=Initialize${LLVM_EXEGESIS_NATIVE_ARCH}ExegesisTarget")
26 endif()
28 target_link_libraries(llvm-exegesis PRIVATE
29   LLVMExegesis
30   ${LLVM_EXEGESIS_NATIVE_TARGET}
31   )