[llvm-branch-commits] [openmp] 8798085 - [libc] Demote compiler check error to a warning (#198033)

Cullen Rhodes via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 26 01:51:52 PDT 2026


Author: Joseph Huber
Date: 2026-05-26T08:51:44Z
New Revision: 8798085803f18d2ad763c2060660b7af5708fe5d

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

LOG: [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)

Added: 
    

Modified: 
    libc/cmake/modules/prepare_libc_gpu_build.cmake
    openmp/device/CMakeLists.txt

Removed: 
    


################################################################################
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