Skip to content

Commit 2affdb3

Browse files
nikiccuviper
authored andcommitted
[rust] Link socket/nsl on Solaris/Illumos
llvm-jitlink and llvm-jitlink-executor use APIs that require the socket and nsl libraries on SunOS.
1 parent d260f5c commit 2affdb3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

llvm/tools/llvm-jitlink/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ add_llvm_tool(llvm-jitlink
2424
llvm-jitlink-macho.cpp
2525
)
2626

27+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
28+
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
29+
endif()
30+
2731
export_executable_symbols(llvm-jitlink)

llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ add_llvm_utility(llvm-jitlink-executor
1111
intrinsics_gen
1212
)
1313

14+
message(${CMAKE_SYSTEM_NAME})
15+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
16+
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
17+
endif()
18+
1419
export_executable_symbols(llvm-jitlink-executor)

0 commit comments

Comments
 (0)