summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorborman <[email protected]>2025-10-06 22:58:55 +0300
committerborman <[email protected]>2025-10-06 23:23:59 +0300
commit16e6cecf9745497f58a62d9c46e956324799f8eb (patch)
tree46e07333d1cec1c46ce4d6daad6bf9682f22edee
parent56884e5ac351ffb1a7e7fea87ff05d344442affd (diff)
Cleanup warning suppression flags
- Format flags in columns for readability - Deduplicate flags between clang versions - Remove project-specific clauses from common config commit_hash:be33eb860a1073800fcd10c8b0be996d604a82a8
-rw-r--r--build/conf/compilers/gnu_compiler.conf54
1 files changed, 29 insertions, 25 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf
index c51baf680fd..3e83fd1c160 100644
--- a/build/conf/compilers/gnu_compiler.conf
+++ b/build/conf/compilers/gnu_compiler.conf
@@ -55,36 +55,40 @@ when ($CLANG == "yes" && $ARCH_AARCH64 == "yes") {
CFLAGS+=-mno-outline-atomics
}
-when ($CLANG == "yes" && $COMPILER_VERSION == "18") {
- CFLAGS+=-Wno-array-parameter -Wno-deprecate-lax-vec-conv-all -Wno-unqualified-std-cast-call -Wno-unused-but-set-parameter -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-address-of-packed-member
- CFLAGS+=-Wno-deprecated-this-capture -Wno-missing-designated-field-initializers \
- -Wno-format -Wno-vla-cxx-extension -Wno-invalid-offsetof \
- when ($OS_ANDROID == "yes") {
- # https://github.com/llvm/llvm-project/issues/68933 is open in clang18 (fix is backported to our build)
- CFLAGS+=-Wno-missing-field-initializers
- }
- when ($MAPSMOBI_BUILD_TARGET == "yes") {
- CFLAGS+=-Wno-deprecated-declarations
- }
+# NB: Since there is no ">=", exact versions have to be spelled below
+
+when ($CLANG == "yes" && ($COMPILER_VERSION == "18" || $COMPILER_VERSION == "20" || $COMPILER_VERSION == "21")) {
+ # new warnings for clang18
+ CFLAGS+=-Wno-array-parameter \
+ -Wno-deprecate-lax-vec-conv-all \
+ -Wno-unqualified-std-cast-call \
+ -Wno-unused-but-set-parameter \
+ -Wno-implicit-function-declaration \
+ -Wno-int-conversion \
+ -Wno-incompatible-function-pointer-types \
+ -Wno-address-of-packed-member \
+ -Wno-deprecated-this-capture \
+ -Wno-missing-designated-field-initializers \
+ -Wno-format \
+ -Wno-vla-cxx-extension \
+ -Wno-invalid-offsetof
}
-when ($CLANG == "yes" && $COMPILER_VERSION == "20") {
- CFLAGS+=-Wno-array-parameter -Wno-deprecate-lax-vec-conv-all -Wno-unqualified-std-cast-call -Wno-unused-but-set-parameter -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-address-of-packed-member
- CFLAGS+=-Wno-deprecated-this-capture -Wno-missing-designated-field-initializers \
- -Wno-format -Wno-vla-cxx-extension -Wno-invalid-offsetof \
+when ($CLANG == "yes" && $COMPILER_VERSION == "18" && $OS_ANDROID == "yes") {
+ # https://github.com/llvm/llvm-project/issues/68933 is open in NDK27/clang18
+ # For other platforms, the fix is backported to our build
+ CFLAGS+=-Wno-missing-field-initializers
+}
+when ($CLANG == "yes" && ($COMPILER_VERSION == "20" || $COMPILER_VERSION == "21")) {
# new warnings for clang20
CFLAGS+=-Wno-alias-template-in-declaration-name \
- -Wno-cast-function-type-mismatch \
- -Wno-explicit-specialization-storage-class \
- -Wno-extraneous-template-head \
- -Wno-missing-template-arg-list-after-template-kw \
- -Wno-nontrivial-memcall \
- -Wno-strict-primary-template-shadow \
-
- when ($MAPSMOBI_BUILD_TARGET == "yes") {
- CFLAGS+=-Wno-deprecated-declarations
- }
+ -Wno-cast-function-type-mismatch \
+ -Wno-explicit-specialization-storage-class \
+ -Wno-extraneous-template-head \
+ -Wno-missing-template-arg-list-after-template-kw \
+ -Wno-nontrivial-memcall \
+ -Wno-strict-primary-template-shadow
}
_CFLAGS_MSAN_TRACK_ORIGIN=