Skip to content

[libc] Demote compiler check error to a warning - #198033

Merged
jhuber6 merged 1 commit into
llvm:mainfrom
jhuber6:WeakenError
May 18, 2026
Merged

jhuber6 merged 1 commit into
llvm:mainfrom
jhuber6:WeakenError

Conversation

@jhuber6

@jhuber6 jhuber6 commented May 15, 2026

Copy link
Copy Markdown
Contributor

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.

@jhuber6
jhuber6 requested a review from a team as a code owner May 15, 2026 22:01
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/198033.diff

1 Files Affected:

  • (modified) libc/cmake/modules/prepare_libc_gpu_build.cmake (+1-1)
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()

@llvmorg-github-actions llvmorg-github-actions Bot added the openmp:libomp OpenMP host runtime label May 15, 2026
Comment thread openmp/device/CMakeLists.txt Outdated
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 "libc for GPU requires an up-to-date clang. CMake compiler "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should probably be omp/offload, not libc.

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.
@jhuber6
jhuber6 merged commit 13da33e into llvm:main May 18, 2026
29 of 30 checks passed
pedroMVicente pushed a commit to pedroMVicente/llvm-project that referenced this pull request May 19, 2026
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.
@jhuber6 jhuber6 added this to the LLVM 22.x Release milestone May 22, 2026
@jhuber6

jhuber6 commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick 13da33e

@llvmbot

llvmbot commented May 22, 2026

Copy link
Copy Markdown
Member

/pull-request #199204

c-rhodes pushed a commit to llvmbot/llvm-project that referenced this pull request May 26, 2026
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 13da33e)
daunabomba pushed a commit to daunabomba/llvm-project that referenced this pull request Jun 2, 2026
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 13da33e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc openmp:libomp OpenMP host runtime

Projects

Development

Successfully merging this pull request may close these issues.

4 participants