[libc-commits] [libc] [openmp] [libc] Demote compiler check error to a warning (PR #198033)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Fri May 15 19:01:02 PDT 2026
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/198033
>From 8af68c2e97d592b53c623bc10888cc28ef47c50a Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Fri, 15 May 2026 17:00:58 -0500
Subject: [PATCH] [libc] Demote compiler check error to a warning
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.
---
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 554c6c49b0435..36ab321e4994c 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 11f474a5ed7f9..32cd2d1dbb2fd 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 libc-commits
mailing list