[llvm] f5459fc - [OpenMP] Add tool dependencies in runtimes mode

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 13:14:59 PDT 2023


Author: Joseph Huber
Date: 2023-04-05T15:14:48-05:00
New Revision: f5459fc03120a03040c8f2f41d5a28bea79ecf75

URL: https://github.com/llvm/llvm-project/commit/f5459fc03120a03040c8f2f41d5a28bea79ecf75
DIFF: https://github.com/llvm/llvm-project/commit/f5459fc03120a03040c8f2f41d5a28bea79ecf75.diff

LOG: [OpenMP] Add tool dependencies in runtimes mode

The OpenMP offloading device runtime depends on multiple tools. We
should ensure that these tools are build before invoking the OpenMP
build.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D147654

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index b9e1f3216280..d47a2d5ee7e3 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -361,12 +361,11 @@ if(runtimes)
   # together in a single CMake invocation.
   set(extra_deps "")
   if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
-    if(TARGET opt)
-      list(APPEND extra_deps opt)
-    endif()
-    if(TARGET llvm-link)
-      list(APPEND extra_deps llvm-link)
-    endif()
+    foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)
+      if(TARGET ${dep} AND OPENMP_ENABLE_LIBOMPTARGET)
+        list(APPEND extra_deps ${dep})
+      endif()
+    endforeach()
   endif()
   if("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND 
       (LLVM_LIBC_FULL_BUILD OR LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES))


        


More information about the llvm-commits mailing list