[Openmp-commits] [PATCH] D130892: [OpenMP] Only include CMAKE_DL_LIBS on unix platforms
Martin Storsjö via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 2 01:00:38 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7f24fd26a8ab: [OpenMP] Only include CMAKE_DL_LIBS on unix platforms (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130892/new/
https://reviews.llvm.org/D130892
Files:
openmp/runtime/src/CMakeLists.txt
Index: openmp/runtime/src/CMakeLists.txt
===================================================================
--- openmp/runtime/src/CMakeLists.txt
+++ openmp/runtime/src/CMakeLists.txt
@@ -139,6 +139,10 @@
set(LIBOMP_LINKER_LANGUAGE CXX)
endif()
+if(UNIX)
+ set(LIBOMP_DL_LIBS ${CMAKE_DL_LIBS})
+endif()
+
# Add the OpenMP library
libomp_get_ldflags(LIBOMP_CONFIGURED_LDFLAGS)
@@ -147,10 +151,10 @@
if(OPENMP_STANDALONE_BUILD OR (NOT OPENMP_ENABLE_LIBOMP_PROFILING))
add_library(omp ${LIBOMP_LIBRARY_KIND} ${LIBOMP_SOURCE_FILES})
# Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS
- target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS})
+ target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${LIBOMP_DL_LIBS})
else()
add_llvm_library(omp ${LIBOMP_LIBRARY_KIND} ${LIBOMP_SOURCE_FILES} PARTIAL_SOURCES_INTENDED
- LINK_LIBS ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS}
+ LINK_LIBS ${LIBOMP_CONFIGURED_LIBFLAGS} ${LIBOMP_DL_LIBS}
LINK_COMPONENTS Support
)
# libomp must be a C++ library such that it can link libLLVMSupport
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130892.449205.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220802/57ed7f70/attachment.bin>
More information about the Openmp-commits
mailing list