aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorl1tsolaiki <l1tsolaiki@yandex-team.com>2024-05-24 18:57:29 +0300
committerl1tsolaiki <l1tsolaiki@yandex-team.com>2024-05-24 19:06:59 +0300
commitb45547676013a5d43cd0072a85643326e686b6fc (patch)
tree6b170d8121dee0a34f3a29f11df9fe09cb92a80a /build
parente2ba2fb36e917cd56f8dd9006d4b6f081a1939ac (diff)
downloadydb-b45547676013a5d43cd0072a85643326e686b6fc.tar.gz
[build conf] Define NO_COMPILER_WARNINGS for gcc
[build conf] Define NO_COMPILER_WARNINGS for gcc 85defc4552c8c13995398eae3a33e698cdf66518
Diffstat (limited to 'build')
-rw-r--r--build/conf/compilers/gnu_compiler.conf23
1 files changed, 17 insertions, 6 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf
index bead447583..6595e1ca1c 100644
--- a/build/conf/compilers/gnu_compiler.conf
+++ b/build/conf/compilers/gnu_compiler.conf
@@ -83,14 +83,25 @@ DEBUG_INFO_FLAGS=$_DEBUG_INFO_FLAGS
when ($NO_WSHADOW == "yes") {
C_WARNING_OPTS += -Wno-shadow
}
-# Though -w is intended to switch off all the warnings,
-# it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang.
-#
-# Use -Wno-everything to force warning suppression.
+
when ($NO_COMPILER_WARNINGS == "yes") {
- C_WARNING_OPTS = -Wno-everything
- CXX_WARNING_OPTS = -Wno-everything
+ # Though -w is intended to switch off all the warnings,
+ # it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang.
+ #
+ # Use -Wno-everything to force warning suppression.
+ when ($CLANG == "yes") {
+ C_WARNING_OPTS = -Wno-everything
+ CXX_WARNING_OPTS = -Wno-everything
+ }
+
+ # On gcc -Wno-everything is not supported, so we use -w
+ # see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
+ elsewhen ($GCC == "yes") {
+ C_WARNING_OPTS = -w
+ CXX_WARNING_OPTS = -w
+ }
}
+
when ($NO_OPTIMIZE == "yes") {
OPTIMIZE = -O0
}