[llvm] [Offload] Remove unnecessary omp CMake target dependencies (PR #149060)
Kenneth Benzie via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 03:35:41 PDT 2025
https://github.com/kbenzie updated https://github.com/llvm/llvm-project/pull/149060
>From bc38c06506cb3381bbb7ba068d1a035a7072f154 Mon Sep 17 00:00:00 2001
From: "Kenneth Benzie (Benie)" <k.benzie83 at gmail.com>
Date: Wed, 16 Jul 2025 11:20:40 +0100
Subject: [PATCH] [Offload] Remove unnecessary omp CMake target dependencies
In my quest to build `liboffload` with ASAN enabled I've been looking
into decoupling `offload` and `openmp` project entablement. When
removing `openmp` from `LLVM_ENABLE_PROJECTS` it resulted in failure to
link against the `omp` target. As an experiment I disabled that
dependency and the build appears to work as expect.
This patch removes dependencies on the `omp` target from
`libomptarget`/`llvm-offload-device-info`/`llvm-omp-kernel-replay`
targets.
---
offload/libomptarget/CMakeLists.txt | 10 ----------
offload/tools/deviceinfo/CMakeLists.txt | 1 -
offload/tools/kernelreplay/CMakeLists.txt | 1 -
3 files changed, 12 deletions(-)
diff --git a/offload/libomptarget/CMakeLists.txt b/offload/libomptarget/CMakeLists.txt
index 93e684e53bf17..f37e984504167 100644
--- a/offload/libomptarget/CMakeLists.txt
+++ b/offload/libomptarget/CMakeLists.txt
@@ -1,11 +1,5 @@
message(STATUS "Building offloading runtime library libomptarget.")
-if(LIBOMP_STANDALONE)
- set(LIBOMP ${LIBOMP_STANDALONE})
-else()
- set(LIBOMP omp)
-endif()
-
add_llvm_library(omptarget
SHARED
@@ -33,10 +27,6 @@ add_llvm_library(omptarget
Support
Object
- LINK_LIBS
- PUBLIC
- ${LIBOMP}
-
NO_INSTALL_RPATH
BUILDTREE_ONLY
)
diff --git a/offload/tools/deviceinfo/CMakeLists.txt b/offload/tools/deviceinfo/CMakeLists.txt
index 3787c12f940a6..6edc4f057c8c9 100644
--- a/offload/tools/deviceinfo/CMakeLists.txt
+++ b/offload/tools/deviceinfo/CMakeLists.txt
@@ -8,6 +8,5 @@ target_include_directories(llvm-offload-device-info PRIVATE
${LIBOMPTARGET_INCLUDE_DIR}
)
target_link_libraries(llvm-offload-device-info PRIVATE
- omp
omptarget
)
diff --git a/offload/tools/kernelreplay/CMakeLists.txt b/offload/tools/kernelreplay/CMakeLists.txt
index 690edd6d5a68e..931b1947fffb4 100644
--- a/offload/tools/kernelreplay/CMakeLists.txt
+++ b/offload/tools/kernelreplay/CMakeLists.txt
@@ -9,6 +9,5 @@ target_include_directories(llvm-omp-kernel-replay PRIVATE
)
target_link_libraries(llvm-omp-kernel-replay PRIVATE
LLVMSupport
- omp
omptarget
)
More information about the llvm-commits
mailing list