Skip to content

Commit eb6bac4

Browse files
add LLVM_LIBC_WNO_ERROR config
1 parent ca08f81 commit eb6bac4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libc/cmake/modules/LLVMLibCObjectRules.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ function(_get_common_compile_options output_var flags)
4343
list(APPEND compile_options "-fno-rtti")
4444
list(APPEND compile_options "-Wall")
4545
list(APPEND compile_options "-Wextra")
46-
list(APPEND compile_options "-Werror")
46+
# -DLLVM_LIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
47+
if(NOT LLVM_LIBC_WNO_ERROR)
48+
list(APPEND compile_options "-Werror")
49+
endif()
4750
list(APPEND compile_options "-Wconversion")
4851
list(APPEND compile_options "-Wno-sign-conversion")
4952
list(APPEND compile_options "-Wimplicit-fallthrough")

0 commit comments

Comments
 (0)