[llvm] [Offload] Deprecate `openmp` and `offload` projects (PR #136314)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 19 06:09:01 PDT 2025


https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/136314

>From 4d8519462b375d046ff07fcf6ae6ea670226408f Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Fri, 18 Apr 2025 10:01:37 -0500
Subject: [PATCH] [Offload] Deprecate `openmp` and `offload` projects

Summary:
These are compiler runtimes are currently have weird support for
projects / runtimes. We should depcrate this to where the only expected
configuration is via a runtimes build. If the user wants a custom setup
they can still use the standalone build.

I remember there were some concerens around the OpenMP module file for
`flang`. Were those resolved?

Fixes: https://github.com/llvm/llvm-project/issues/124014
---
 llvm/CMakeLists.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index cfd1a086c0fc2..10bef69e23c32 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -164,6 +164,20 @@ if ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS)
     "https://compiler-rt.llvm.org/ for building the runtimes.")
 endif()
 
+if ("offload" IN_LIST LLVM_ENABLE_PROJECTS)
+  message(WARNING "Using LLVM_ENABLE_PROJECTS=offload is deprecated now, and will "
+    "become a fatal error in the LLVM 21 release.  Please use "
+    "-DLLVM_ENABLE_RUNTIMES=offload or see the instructions at "
+    "https://openmp.llvm.org/ for building the runtimes.")
+endif()
+
+if ("openmp" IN_LIST LLVM_ENABLE_PROJECTS)
+  message(WARNING "Using LLVM_ENABLE_PROJECTS=openmp is deprecated now, and will "
+    "become a fatal error in the LLVM 21 release.  Please use "
+    "-DLLVM_ENABLE_RUNTIMES=openmp or see the instructions at "
+    "https://openmp.llvm.org/ for building the runtimes.")
+endif()
+
 if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
   if (NOT "flang" IN_LIST LLVM_ENABLE_PROJECTS)
     message(FATAL_ERROR "Flang is not enabled, but is required for the Flang-RT runtime")



More information about the llvm-commits mailing list