diff options
author | Vitaly Buka <vitalybuka@google.com> | 2023-12-04 11:12:38 -0800 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2023-12-04 11:12:38 -0800 |
commit | 0f109aba90c1388ebb9c17bde38bb46c01000f9f (patch) | |
tree | 8da45457aac0dbed8ed5a6baa1aa4c3b904b833f | |
parent | 5971d501beeadfb09a6df3764e391e42be35e79e (diff) | |
parent | 5aa2f8c98cd7b05e4cb8b6c74db08cf417c2a1a6 (diff) | |
download | llvm-users/vitalybuka/spr/main.nfcasan-replace-a-few-if-sanitizer_apple-with-if-sanitizer_apple.zip llvm-users/vitalybuka/spr/main.nfcasan-replace-a-few-if-sanitizer_apple-with-if-sanitizer_apple.tar.gz llvm-users/vitalybuka/spr/main.nfcasan-replace-a-few-if-sanitizer_apple-with-if-sanitizer_apple.tar.bz2 |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.nfcasan-replace-a-few-if-sanitizer_apple-with-if-sanitizer_apple
Created using spr 1.3.4
[skip ci]
-rw-r--r-- | libc/cmake/modules/LLVMLibCObjectRules.cmake | 4 | ||||
-rw-r--r-- | libc/docs/dev/code_style.rst | 8 | ||||
-rw-r--r-- | libc/src/__support/CMakeLists.txt | 1 | ||||
-rw-r--r-- | libc/src/__support/integer_utils.h | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index 5fbbfd5..ef654bd 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") diff --git a/libc/docs/dev/code_style.rst b/libc/docs/dev/code_style.rst index a050a4c..eeeced0 100644 --- a/libc/docs/dev/code_style.rst +++ b/libc/docs/dev/code_style.rst @@ -178,3 +178,11 @@ these functions do not call the constructors and destructors of the allocated/deallocated objects. So, use these functions carefully and only when it is absolutely clear that constructor and destructor invocation is not required. + +Warnings in sources +=================== + +We expect contributions to be free of warnings from the `minimum supported +compiler versions`__ (and newer). + +.. __: https://libc.llvm.org/compiler_support.html#minimum-supported-versions diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt index ba80965..d6dbad6 100644 --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -189,6 +189,7 @@ add_header_library( integer_utils.h DEPENDS .bit + .math_extras .number_pair libc.src.__support.common libc.src.__support.CPP.type_traits diff --git a/libc/src/__support/integer_utils.h b/libc/src/__support/integer_utils.h index 433e992..661318f 100644 --- a/libc/src/__support/integer_utils.h +++ b/libc/src/__support/integer_utils.h @@ -13,6 +13,7 @@ #include "src/__support/common.h" #include "bit.h" +#include "math_extras.h" #include "number_pair.h" #include <stdint.h> |