[libc-commits] [libc] 429c8c9 - [𝘀𝗽𝗿] changes introduced through rebase
Vitaly Buka via libc-commits
libc-commits at lists.llvm.org
Mon Dec 4 11:12:53 PST 2023
Author: Vitaly Buka
Date: 2023-12-04T11:12:41-08:00
New Revision: 429c8c9b8849e11fa93e799ecd3b4e31223b3848
URL: https://github.com/llvm/llvm-project/commit/429c8c9b8849e11fa93e799ecd3b4e31223b3848
DIFF: https://github.com/llvm/llvm-project/commit/429c8c9b8849e11fa93e799ecd3b4e31223b3848.diff
LOG: [𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4
[skip ci]
Added:
Modified:
libc/cmake/modules/LLVMLibCObjectRules.cmake
libc/docs/dev/code_style.rst
libc/src/__support/CMakeLists.txt
libc/src/__support/integer_utils.h
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 5fbbfd58db2d0..ef654bd7b34ab 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 a050a4c1d3dd7..eeeced0359adb 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 ba80965b5aaaf..d6dbad661cb73 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 433e99227bcfd..661318f03bfd3 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>
More information about the libc-commits
mailing list