[llvm-branch-commits] [libc] [openmp] release/22.x: [libc] Demote compiler check error to a warning (#198033) (PR #199204)
Cullen Rhodes via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 26 01:51:55 PDT 2026
https://github.com/c-rhodes updated https://github.com/llvm/llvm-project/pull/199204
>From 8798085803f18d2ad763c2060660b7af5708fe5d Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Mon, 18 May 2026 10:08:44 -0500
Subject: [PATCH] [libc] Demote compiler check error to a warning (#198033)
Summary:
This check exists to encode the policy that this is only intended to be
built with a just-built compiler. In practice it's a little too strict
and breaks pretty much every six months when the version bumps or when
people try to build a separate patch. Just demote to a warning.
(cherry picked from commit 13da33e922fe43cd97246f5e33320acc4f5ea186)
---
libc/cmake/modules/prepare_libc_gpu_build.cmake | 2 +-
openmp/device/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index 55cd0242eedeb..2686a5dc4b4df 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -7,7 +7,7 @@ endif()
set(req_ver "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
if(LLVM_VERSION_MAJOR AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
- message(FATAL_ERROR "Cannot build libc for GPU. CMake compiler "
+ message(WARNING "libc for GPU requires an up-to-date clang. CMake compiler "
"'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
" is not 'Clang ${req_ver}'.")
endif()
diff --git a/openmp/device/CMakeLists.txt b/openmp/device/CMakeLists.txt
index 54cfdfef440a5..06fd5f0f2ed59 100644
--- a/openmp/device/CMakeLists.txt
+++ b/openmp/device/CMakeLists.txt
@@ -2,7 +2,7 @@
set(req_ver "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
if(LLVM_VERSION_MAJOR AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
- message(FATAL_ERROR "Cannot build GPU device runtime. CMake compiler "
+ message(WARNING "openmp for GPU requires an up-to-date clang. CMake compiler "
"'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
" is not 'Clang ${req_ver}'.")
endif()
More information about the llvm-branch-commits
mailing list