diff options
author | Ryan Egesdahl <ryan.egesdahl@mongodb.com> | 2021-02-18 15:58:24 -0800 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-19 18:21:10 +0000 |
commit | c4088911e4347147c11bc3c2fb29e4f562dd7f66 (patch) | |
tree | e5e3b860f90051785f3a5b7df5311bec316c8e67 /SConstruct | |
parent | 51142d61eeea0a30b2691680663d60c17441afce (diff) | |
download | mongo-c4088911e4347147c11bc3c2fb29e4f562dd7f66.tar.gz |
SERVER-54282 Honor --disable-warnings-as-errors for unused results
We should not make any compiler warnings cause errors if
`--disable-warnings-as-errors` was given, so we condition the one
instance where we weren't, `--Werror=unused-result`, conditioned upon
it.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 4a585c15e17..29930ed6979 100644 --- a/SConstruct +++ b/SConstruct @@ -2386,7 +2386,7 @@ if env.TargetOSIs('posix'): env.Append( CCFLAGS=["-Werror"] ) env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) - if env.ToolchainIs('clang'): + if env.ToolchainIs('clang') and not has_option('disable-warnings-as-errors'): env.Append( CXXFLAGS=['-Werror=unused-result'] ) # On OS X, clang doesn't want the pthread flag at link time, or it |