SERVER-95993 suppress -Winterference-size (#29519)

GitOrigin-RevId: e2b28e4bb6dabc95947eb1b48bb663e45af30777
This commit is contained in:
James Bronsted 2024-11-27 10:53:58 -05:00 committed by MongoDB Bot
parent 809d42b47a
commit 0bd9f76e61
3 changed files with 19 additions and 0 deletions

View File

@ -111,6 +111,7 @@ Checks: '-*,
-cert-err60-cpp,
-cert-flp30-c,
-clang-diagnostic-builtin-macro-redefined,
-clang-diagnostic-unknown-warning-option,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-c-copy-assignment-signature,
-cppcoreguidelines-interfaces-global-init,

View File

@ -3905,6 +3905,10 @@ def doConfigure(myenv):
# TODO SERVER-58675 - Remove this suppression after abseil is upgraded
myenv.AddToCXXFLAGSIfSupported("-Wno-deprecated-builtins")
# We do not define an ABI that must be stable from build to build, so inconsistent hardware
# interference sizes between builds does not affect correctness.
myenv.AddToCXXFLAGSIfSupported("-Wno-interference-size")
# Check if we can set "-Wnon-virtual-dtor" when "-Werror" is set. The only time we can't set it is on
# clang 3.4, where a class with virtual function(s) and a non-virtual destructor throws a warning when
# it shouldn't.

View File

@ -711,6 +711,19 @@ def _impl(ctx):
],
)
# We do not define an ABI that must be stable from build to build, so inconsistent hardware
# interference sizes between builds does not affect correctness.
no_interference_size_warning_feature = feature(
name = "no_interference_size_warning",
enabled = True,
flag_sets = [
flag_set(
actions = all_cpp_compile_actions,
flag_groups = [flag_group(flags = ["-Wno-interference-size"])],
),
],
)
features = [
bin_dirs_feature,
default_compile_flags_feature,
@ -751,6 +764,7 @@ def _impl(ctx):
pessimizing_move_warning_feature,
no_invalid_offsetof_warning_feature,
no_class_memaccess_warning_feature,
no_interference_size_warning_feature,
]
return [