forked from OSchip/llvm-project
[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
This commit is contained in:
parent
561fb7f60a
commit
f111dc7cfc
|
@ -24,4 +24,8 @@ add_llvm_tool(llvm-jitlink
|
|||
llvm-jitlink-macho.cpp
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
|
||||
endif()
|
||||
|
||||
export_executable_symbols(llvm-jitlink)
|
||||
|
|
|
@ -11,4 +11,8 @@ add_llvm_utility(llvm-jitlink-executor
|
|||
intrinsics_gen
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
|
||||
endif()
|
||||
|
||||
export_executable_symbols(llvm-jitlink-executor)
|
||||
|
|
Loading…
Reference in New Issue