diff options
Diffstat (limited to 'openmp/libomptarget/src/CMakeLists.txt')
-rw-r--r-- | openmp/libomptarget/src/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt index 2a6cd93c6ec9..ef3a6270b78a 100644 --- a/openmp/libomptarget/src/CMakeLists.txt +++ b/openmp/libomptarget/src/CMakeLists.txt @@ -31,13 +31,15 @@ add_llvm_library(omptarget Support Object - LINK_LIBS - PRIVATE - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports" NO_INSTALL_RPATH ) target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR}) +if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG) + target_link_libraries(omptarget PRIVATE + "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") +endif() + # libomptarget.so needs to be aware of where the plugins live as they # are now separated in the build directory. set_target_properties(omptarget PROPERTIES INSTALL_RPATH "$ORIGIN" BUILD_RPATH "$ORIGIN:${CMAKE_CURRENT_BINARY_DIR}/..") |