diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt index 2dc8285dd773..c7cafd105f52 100644 --- a/offload/CMakeLists.txt +++ b/offload/CMakeLists.txt @@ -322,14 +322,6 @@ else() endif() endmacro() -if(OPENMP_STANDALONE_BUILD OR TARGET omp) - # Check LIBOMP_HAVE_VERSION_SCRIPT_FLAG - include(LLVMCheckCompilerLinkerFlag) - if(NOT APPLE) - llvm_check_compiler_linker_flag(C "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/../openmp/runtime/src/exports_test_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG) - endif() -endif() - # OMPT support for libomptarget # Follow host OMPT support and check if host support has been requested. # LIBOMP_HAVE_OMPT_SUPPORT indicates whether host OMPT support has been implemented. diff --git a/offload/liboffload/CMakeLists.txt b/offload/liboffload/CMakeLists.txt index db12236ddfc7..1b098bc01e21 100644 --- a/offload/liboffload/CMakeLists.txt +++ b/offload/liboffload/CMakeLists.txt @@ -14,8 +14,8 @@ foreach(plugin IN LISTS LIBOMPTARGET_PLUGINS_TO_BUILD) target_link_libraries(LLVMOffload PRIVATE omptarget.rtl.${plugin}) endforeach() -if(LIBOMP_HAVE_VERSION_SCRIPT_FLAG) - target_link_libraries(LLVMOffload PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") +if(LLVM_HAVE_LINK_VERSION_SCRIPT) + target_link_libraries(LLVMOffload PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") endif() target_include_directories(LLVMOffload PUBLIC diff --git a/offload/libomptarget/CMakeLists.txt b/offload/libomptarget/CMakeLists.txt index c5f5d902fad1..93e684e53bf1 100644 --- a/offload/libomptarget/CMakeLists.txt +++ b/offload/libomptarget/CMakeLists.txt @@ -44,9 +44,8 @@ target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMPTARGET_BINARY_INCLUDE_DIR} ) -if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG) - target_link_libraries(omptarget PRIVATE - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") +if(LLVM_HAVE_LINK_VERSION_SCRIPT) + target_link_libraries(omptarget PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") endif() # Define the TARGET_NAME and DEBUG_PREFIX.