Skip to content

Commit

Permalink
[libomptarget] Fix 'libomptarget' libraries being installed twice (#8…
Browse files Browse the repository at this point in the history
…3624)

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.
  • Loading branch information
jhuber6 committed Mar 1, 2024
1 parent ae76dfb commit 2fb764d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions openmp/libomptarget/plugins-nextgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$")
${OPENMP_PTHREAD_LIB}

NO_INSTALL_RPATH
BUILDTREE_ONLY
)

if(LIBOMPTARGET_DEP_LIBFFI_FOUND)
Expand Down
1 change: 1 addition & 0 deletions openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions openmp/libomptarget/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ add_llvm_library(omptarget
omp

NO_INSTALL_RPATH
BUILDTREE_ONLY
)
target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})

Expand Down

0 comments on commit 2fb764d

Please sign in to comment.