summaryrefslogtreecommitdiff
path: root/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt')
-rw-r--r--openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
index 6b7d2d743c73..397b06b67692 100644
--- a/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
+++ b/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
@@ -38,11 +38,16 @@ add_llvm_library(omptarget.rtl.cuda.nextgen SHARED
MemoryManager
PluginInterface
${OPENMP_PTHREAD_LIB}
- "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exports,-z,defs"
NO_INSTALL_RPATH
)
+if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
+ target_link_libraries(omptarget.rtl.cuda.nextgen PRIVATE
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exports,-z,defs")
+endif()
+
+
if(LIBOMPTARGET_DEP_CUDA_FOUND AND NOT LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA)
libomptarget_say("Building CUDA plugin linked against libcuda")
target_link_libraries(omptarget.rtl.cuda.nextgen PRIVATE CUDA::cuda_driver)