[libc-commits] [libc] [libc] build with -Werror (PR #73966)

via libc-commits libc-commits at lists.llvm.org
Thu Nov 30 09:57:15 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

<details>
<summary>Changes</summary>

A recent commit introduced warnings observable when building unit tests. If the
unit tests don't fail when warnings are introduced into the build, then we
might fail to notice them in the stream of output from check-libc.

Link: https://github.com/llvm/llvm-project/pull/72763/files#r1410932348


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


1 Files Affected:

- (modified) libc/cmake/modules/LLVMLibCObjectRules.cmake (+1) 


``````````diff
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index d5df27a2dcb4341..da14d4767bff2c6 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -35,6 +35,7 @@ function(_get_common_compile_options output_var flags)
     list(APPEND compile_options "-fno-rtti")
     list(APPEND compile_options "-Wall")
     list(APPEND compile_options "-Wextra")
+    list(APPEND compile_options "-Werror")
     list(APPEND compile_options "-Wconversion")
     list(APPEND compile_options "-Wno-sign-conversion")
     list(APPEND compile_options "-Wimplicit-fallthrough")

``````````

</details>


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


More information about the libc-commits mailing list