[clang] [CMake] Enable -Werror=global-constructors for clang/lib (PR #246753)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 27 14:13:42 PST 2026


================
@@ -1,3 +1,10 @@
+# HAS_WERROR_GLOBAL_CTORS and LLVM_HAS_NOGLOBAL_CTOR_MUTEX are set by
+# llvm/lib/Support/CMakeLists.txt.
----------------
MaskRay wrote:

The PR is safe, but the comment is probably incorrect for standalone builds.

I'll append `... They are unset in a standalone build, which skips the check.`

https://github.com/llvm/llvm-project/pull/246753


More information about the cfe-commits mailing list