[llvm] [CI] Enable -Werror in pre-merge CI (PR #155627)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 09:53:01 PDT 2025
dwblaikie wrote:
(both as an individual, and with my infra area team hat on - tagging @tstellar and @petrhosek so they can weigh in too)
I think there's some "canonical"-ish clang version (most recent release?) for which we should be `-Werror` clean to a degree I'd be willing to enforce as a pre/post commit line. (the fact that we have postcommit bots that have this to me points to that we should have precommit too, approximately)
I'd generally encourage developers to be using `-Werror`, I use it - but perhaps with a more clear sense of what we're all going to keep `-Werror` clean in policy, and in precommit checks, might make that more reliable. (I currently build with some random boot-strap build of clang, which is usually OK to keep `-Werror`-clean, with some diagnostic volatility) If it weren't for the impractical need to two-stage, I'd advocate for `-Werror` on a second stage/self-host build. It tends to be what we do when we get new clang warnings (@AaronBallman for his thoughts here) - partly using the LLVM project as a testing ground to ensure the warning and fixes are good quality - but also to ensure a two-stage -Werror build succeeds after the diagnostic lands.
https://github.com/llvm/llvm-project/pull/155627
More information about the llvm-commits
mailing list