diff --git a/SConstruct b/SConstruct index 86ed70d31d3..014049cca18 100644 --- a/SConstruct +++ b/SConstruct @@ -3946,6 +3946,10 @@ def doConfigure(myenv): myenv.Append(CXXFLAGS=["-Wnon-virtual-dtor"]) conf.Finish() + # TODO(SERVER-97447): Remove this once we're fully on the v5 toolchain. In the meantime, we + # need to suppress some warnings that are only recognized by the new compilers. + myenv.AddToCXXFLAGSIfSupported("-Wno-unknown-warning-option") + # As of XCode 9, this flag must be present (it is not enabled # by -Wall), in order to enforce that -mXXX-version-min=YYY # will enforce that you don't use APIs from ZZZ. diff --git a/bazel/mongo_src_rules.bzl b/bazel/mongo_src_rules.bzl index ba33c47cf34..05728b52c56 100644 --- a/bazel/mongo_src_rules.bzl +++ b/bazel/mongo_src_rules.bzl @@ -489,6 +489,11 @@ GCC_OR_CLANG_WARNINGS_COPTS = select({ # SERVER-76472 we don't try to maintain ABI so disable warnings about # possible ABI issues. "-Wno-psabi", + + # TODO(SERVER-97447): Remove this once we're fully on the v5 toolchain. + # In the meantime, we need to suppress some warnings that are only + # recognized by the new compilers. + "-Wno-unknown-warning-option", ], "//conditions:default": [], })