[llvm] [offload] Add Windows offload support (PR #187006)

Weronika Lewandowska via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 04:39:25 PDT 2026


================
@@ -155,11 +160,18 @@ if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
 endif()
 
 set(LIBOMPTARGET_ALL_PLUGIN_TARGETS amdgpu cuda)
-set(LIBOMPTARGET_PLUGINS_TO_BUILD "all" CACHE STRING
-    "Semicolon-separated list of plugins to use: cuda, amdgpu, level_zero, or \"all\".")
+# On Windows, build only the Level Zero plugin for now.
+if(WIN32)
+  set(LIBOMPTARGET_PLUGINS_TO_BUILD "level_zero" CACHE STRING
+      "Semicolon-separated list of plugins to use: level_zero.")
+  message(STATUS "Building liboffload on Windows with the level_zero plugin")
+else()
+  set(LIBOMPTARGET_PLUGINS_TO_BUILD "all" CACHE STRING
+      "Semicolon-separated list of plugins to use: cuda, amdgpu or \"all\".")
 
-if(LIBOMPTARGET_PLUGINS_TO_BUILD STREQUAL "all")
-  set(LIBOMPTARGET_PLUGINS_TO_BUILD ${LIBOMPTARGET_ALL_PLUGIN_TARGETS})
+  if(LIBOMPTARGET_PLUGINS_TO_BUILD STREQUAL "all")
+    set(LIBOMPTARGET_PLUGINS_TO_BUILD ${LIBOMPTARGET_ALL_PLUGIN_TARGETS})
+  endif()
----------------
wlemkows wrote:

Done

https://github.com/llvm/llvm-project/pull/187006


More information about the llvm-commits mailing list