[llvm] [CI] Enable -Werror in pre-merge CI (PR #155627)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 07:16:08 PDT 2025


https://github.com/nikic created https://github.com/llvm/llvm-project/pull/155627

We have many buildbots that run with -Werror, but it's currently not enabled in pre-merge CI, so adding a warning causes a slew of post-commit failures.

Note that we only guarantee warning freedom when compiling with a recent version of clang, but not when using gcc or msvc. The monolithic-linux build uses recent clang, so it should be safe to enable the option there.

>From 48b01bf3c649bbe6a5babd39f066e39d13b12409 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Wed, 27 Aug 2025 16:13:59 +0200
Subject: [PATCH] Enable -Werror in pre-merge CI

We have many buildbots that run with -Werror, but it's currently
not enabled in pre-merge CI, so adding a warning causes a slew
of post-commit failures.

Note that we only guarantee warning freedom when compiling with a
recent version of clang, but not when using gcc or msvc. The
monolithic-linux build uses recent clang, so it should be safe
to enable the option there.
---
 .ci/monolithic-linux.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 3ca4d05f4c891..5abb8d72df028 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -61,7 +61,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D LLDB_ENABLE_PYTHON=ON \
       -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
       -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-      -D CMAKE_EXE_LINKER_FLAGS="-no-pie"
+      -D CMAKE_EXE_LINKER_FLAGS="-no-pie" \
+      -D LLVM_ENABLE_WERROR=ON
 
 start-group "ninja"
 



More information about the llvm-commits mailing list