[llvm] ad9e5bf - [Offload] Forward LIBOMPTARGET_ cmake options to offload (#199906)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 04:25:29 PDT 2026


Author: Weronika Lewandowska
Date: 2026-06-02T13:25:24+02:00
New Revision: ad9e5bfcaf38580b2596967d3e1b7c3746d31bb1

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

LOG: [Offload] Forward LIBOMPTARGET_ cmake options to offload (#199906)

Add LIBOMPTARGET for offload so LIBOMPTARGET_* options are forwarded.
Note that the LIBOMPTARGET_* prefix was inherited from OpenMP's CMake
setup.

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index c2352e846f03f..707451408f091 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -233,9 +233,14 @@ foreach(entry ${runtimes})
   string(REPLACE "-" "_" canon_name ${name})
   string(TOUPPER ${canon_name} canon_name)
   list(APPEND prefixes ${canon_name})
-  if (${canon_name} STREQUAL "OPENMP")
+  if(canon_name STREQUAL "OPENMP")
     list(APPEND prefixes "LIBOMP" "LIBOMPTARGET")
   endif()
+  # Add LIBOMPTARGET for offload so LIBOMPTARGET_* options are forwarded.
+  # Note that the LIBOMPTARGET_* prefix was inherited from OpenMP's CMake setup.
+  if(canon_name STREQUAL "OFFLOAD")
+    list(APPEND prefixes "LIBOMPTARGET")
+  endif()
   # Many compiler-rt options start with SANITIZER_ and DARWIN_ rather than
   # COMPILER_RT_, so when compiler-rt is enabled, consider both.
   if(canon_name STREQUAL "COMPILER_RT")


        


More information about the llvm-commits mailing list