diff --git a/openmp/libomptarget/plugins-nextgen/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/CMakeLists.txt index 3cc2b8512b77f..3ca02368253ef 100644 --- a/openmp/libomptarget/plugins-nextgen/CMakeLists.txt +++ b/openmp/libomptarget/plugins-nextgen/CMakeLists.txt @@ -46,6 +46,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$") ${OPENMP_PTHREAD_LIB} NO_INSTALL_RPATH + BUILDTREE_ONLY ) if(LIBOMPTARGET_DEP_LIBFFI_FOUND) diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt index 68ce63467a6c8..9e0ea08d8375f 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt @@ -78,6 +78,7 @@ add_llvm_library(omptarget.rtl.amdgpu SHARED ${LDFLAGS_UNDEFINED} NO_INSTALL_RPATH + BUILDTREE_ONLY ) if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT)) diff --git a/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt index 95b288cab3114..2bfb47168a7f3 100644 --- a/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt +++ b/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt @@ -38,6 +38,7 @@ add_llvm_library(omptarget.rtl.cuda SHARED ${OPENMP_PTHREAD_LIB} NO_INSTALL_RPATH + BUILDTREE_ONLY ) if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT)) diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt index 1a0e26f104be6..9bc3f3339583d 100644 --- a/openmp/libomptarget/src/CMakeLists.txt +++ b/openmp/libomptarget/src/CMakeLists.txt @@ -41,6 +41,7 @@ add_llvm_library(omptarget omp NO_INSTALL_RPATH + BUILDTREE_ONLY ) target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})