Skip to content

Commit 2fb764d

Browse files
authored
[libomptarget] Fix 'libomptarget' libraries being installed twice (#83624)
Summary: We use `add_llvm_library` as a shorthand for setting up all the dependencies and libraries we need for the OpenMP offloading runtime as they depend on a lot of the LLVM utilities. However, we always explicitly installed these manually. Behind the scenes the function would then install it again. This was unnoticed because until now the destinations matched. Now that we want it to optionally go into the other directory it is duplicating them. Fix this by stating that this is a build tree only library so we can handle it ourselves.
1 parent ae76dfb commit 2fb764d

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

openmp/libomptarget/plugins-nextgen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$")
4646
${OPENMP_PTHREAD_LIB}
4747

4848
NO_INSTALL_RPATH
49+
BUILDTREE_ONLY
4950
)
5051

5152
if(LIBOMPTARGET_DEP_LIBFFI_FOUND)

openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ add_llvm_library(omptarget.rtl.amdgpu SHARED
7878
${LDFLAGS_UNDEFINED}
7979

8080
NO_INSTALL_RPATH
81+
BUILDTREE_ONLY
8182
)
8283

8384
if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT))

openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ add_llvm_library(omptarget.rtl.cuda SHARED
3838
${OPENMP_PTHREAD_LIB}
3939

4040
NO_INSTALL_RPATH
41+
BUILDTREE_ONLY
4142
)
4243

4344
if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT))

openmp/libomptarget/src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ add_llvm_library(omptarget
4141
omp
4242

4343
NO_INSTALL_RPATH
44+
BUILDTREE_ONLY
4445
)
4546
target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})
4647

0 commit comments

Comments
 (0)