diff options
author | Dimitry Andric <dimitry@andric.com> | 2017-06-26 19:16:49 +0000 |
---|---|---|
committer | Dimitry Andric <dimitry@andric.com> | 2017-06-26 19:16:49 +0000 |
commit | 695c69316bca9b3f81f1a777bb78753e85c1488b (patch) | |
tree | f182088cddfc2259bb7904a9d621b44ee1dd1d2d | |
parent | 9ac3e4221177906c07ee7fda25037e47581fadf0 (diff) | |
download | bcm5719-llvm-695c69316bca9b3f81f1a777bb78753e85c1488b.tar.gz bcm5719-llvm-695c69316bca9b3f81f1a777bb78753e85c1488b.zip |
Only use libdl when it is available
Summary: On BSDs, there is no `libdl.so`, and functions like `dlopen`
are implemented in the main C library instead. Use the `CMAKE_DL_LIBS`
variable instead of hardcoding a dependency on the `dl` library.
Reviewers: grokos, joerg, emaste
Reviewed By: emaste
Subscribers: jlpeyton, mgorny, openmp-commits
Differential Revision: https://reviews.llvm.org/D34632
llvm-svn: 306319
-rw-r--r-- | openmp/libomptarget/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt index 0710279b730..c5e0a6c6ece 100644 --- a/openmp/libomptarget/CMakeLists.txt +++ b/openmp/libomptarget/CMakeLists.txt @@ -95,7 +95,7 @@ if(LIBOMPTARGET_HAVE_STD_CPP11_FLAG) # Build libomptarget library with libdl dependency. add_library(omptarget SHARED ${src_files}) target_link_libraries(omptarget - dl + ${CMAKE_DL_LIBS} "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") # Install libomptarget under the lib destination folder. |