1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/tools/llvm-jitlink/CMakeLists.txt
Nikita Popov d8092ee676 [cmake] Link socket/nsl on SunOS in llvm-jitlink
llvm-jitlink and llvm-jitlink-executor make use of APIs that are
part of the socket and nsl libraries on SunOS systems (Solaris and
Illumos). Make sure they get linked.

Ran into this in Rust CI when cross-compiling LLVM 12 to these
targets.

Differential Revision: https://reviews.llvm.org/D97633
2021-03-09 19:04:59 +01:00

32 lines
536 B
CMake

if ( LLVM_INCLUDE_UTILS )
add_subdirectory(llvm-jitlink-executor)
endif()
set(LLVM_LINK_COMPONENTS
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
BinaryFormat
ExecutionEngine
JITLink
MC
Object
OrcJIT
OrcShared
OrcTargetProcess
RuntimeDyld
Support
)
add_llvm_tool(llvm-jitlink
llvm-jitlink.cpp
llvm-jitlink-elf.cpp
llvm-jitlink-macho.cpp
)
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
export_executable_symbols(llvm-jitlink)