diff options
author | Nick Desaulniers <nickdesaulniers@users.noreply.github.com> | 2024-01-08 09:07:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 09:07:35 -0800 |
commit | c52b467875e26d5d3554514489d965eda3ab0cd2 (patch) | |
tree | 0b25d7a28e844ef2f3cf4875178bf1e7df7b2668 /libc/cmake/modules | |
parent | c68a9d25e99a096f6862fc4b57dd380a21245d31 (diff) | |
download | llvm-c52b467875e26d5d3554514489d965eda3ab0cd2.zip llvm-c52b467875e26d5d3554514489d965eda3ab0cd2.tar.gz llvm-c52b467875e26d5d3554514489d965eda3ab0cd2.tar.bz2 |
Reapply "[libc] build with -Werror (#73966)" (#74506)
This reverts commit 6886a52d6dbefff77f33de12ff85d654e2557f81.
Most of the errors observed in postsubmit have been addressed. We can
fix-forward the remaining ones.
Link: https://lab.llvm.org/buildbot/#/changes/117129
Diffstat (limited to 'libc/cmake/modules')
-rw-r--r-- | libc/cmake/modules/LLVMLibCObjectRules.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index c3e3fa2..6eba17a 100644 --- a/libc/cmake/modules/LLVMLibCObjectRules.cmake +++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake @@ -43,6 +43,10 @@ function(_get_common_compile_options output_var flags) list(APPEND compile_options "-fno-rtti") list(APPEND compile_options "-Wall") list(APPEND compile_options "-Wextra") + # -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror. + if(NOT LIBC_WNO_ERROR) + list(APPEND compile_options "-Werror") + endif() list(APPEND compile_options "-Wconversion") list(APPEND compile_options "-Wno-sign-conversion") list(APPEND compile_options "-Wimplicit-fallthrough") |