[Openmp-commits] [openmp] 13da33e - [libc] Demote compiler check error to a warning (#198033)

via Openmp-commits openmp-commits at lists.llvm.org
Mon May 18 08:08:51 PDT 2026


Author: Joseph Huber
Date: 2026-05-18T10:08:44-05:00
New Revision: 13da33e922fe43cd97246f5e33320acc4f5ea186

URL: https://github.com/llvm/llvm-project/commit/13da33e922fe43cd97246f5e33320acc4f5ea186
DIFF: https://github.com/llvm/llvm-project/commit/13da33e922fe43cd97246f5e33320acc4f5ea186.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.

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 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 Openmp-commits mailing list