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

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Thu Nov 30 09:56:45 PST 2023


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

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


>From 30b1cc7ab50d2335d76703919b60768669a2ee88 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Thu, 30 Nov 2023 09:54:15 -0800
Subject: [PATCH] [libc] build with -Werror

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
---
 libc/cmake/modules/LLVMLibCObjectRules.cmake | 1 +
 1 file changed, 1 insertion(+)

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")



More information about the libc-commits mailing list