[llvm] 49cdd62 - [llvm-jitlink] Link libnetwork on Haiku in llvm-jitlink
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri May 14 20:49:29 PDT 2021
Author: Lang Hames
Date: 2021-05-14T20:49:03-07:00
New Revision: 49cdd62db5693ac05d4738e7c066cda598ecb890
URL: https://github.com/llvm/llvm-project/commit/49cdd62db5693ac05d4738e7c066cda598ecb890
DIFF: https://github.com/llvm/llvm-project/commit/49cdd62db5693ac05d4738e7c066cda598ecb890.diff
LOG: [llvm-jitlink] Link libnetwork on Haiku in llvm-jitlink
The system's network API is in libnetwork.so, so we explicitly need to link to
them on Haiku. This patch is similar to https://reviews.llvm.org/D97633.
Patch by Niels Reedijk. Thanks Niels!
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D98405
Added:
Modified:
llvm/tools/llvm-jitlink/CMakeLists.txt
llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/tools/llvm-jitlink/CMakeLists.txt b/llvm/tools/llvm-jitlink/CMakeLists.txt
index 90b4ca6c910b3..c9f9a536d49d5 100644
--- a/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,6 +24,10 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt b/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
index b1cdf60569dab..7e4570c13d81f 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
@@ -11,6 +11,10 @@ add_llvm_utility(llvm-jitlink-executor
intrinsics_gen
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink-executor PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
endif()
More information about the llvm-commits
mailing list