mirror of https://github.com/mongodb/mongo
SERVER-114971 fix warnings as errors (#44889)
GitOrigin-RevId: a506648363035c57bfd81ed30e435d6cb437251d
This commit is contained in:
parent
daa4d03290
commit
16253e95d8
|
|
@ -24,6 +24,18 @@ def generate_config_header_impl(ctx):
|
|||
action_name = ACTION_NAMES.cpp_compile,
|
||||
variables = compile_variables,
|
||||
)
|
||||
|
||||
# The config header generation should not fail due to compiler warnings,
|
||||
# so remove any flags that would treat warnings as errors.
|
||||
compiler_flags = [
|
||||
flag
|
||||
for flag in compiler_flags
|
||||
if not (
|
||||
flag == "-Werror" or
|
||||
flag.startswith("-Werror") or
|
||||
flag == "/WX"
|
||||
)
|
||||
]
|
||||
link_flags = cc_common.get_memory_inefficient_command_line(
|
||||
feature_configuration = feature_configuration,
|
||||
action_name = ACTION_NAMES.cpp_link_executable,
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ def get_common_features(ctx):
|
|||
),
|
||||
feature(
|
||||
name = "warnings_as_errors_compile",
|
||||
enabled = False,
|
||||
enabled = ctx.attr.warnings_as_errors_enabled,
|
||||
flag_sets = [
|
||||
flag_set(
|
||||
actions = all_compile_actions,
|
||||
|
|
|
|||
Loading…
Reference in New Issue