diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2022-01-24 13:17:19 -0600 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-01 04:49:55 +0000 |
commit | 92ab73feba0c21ab49d101281c3cb6eab98d27dd (patch) | |
tree | 053c28a71f3f692b898a5fb682a2e0031805b3bd | |
parent | 0a0a8790f069e172bfdc277c401f265b992e261b (diff) | |
download | mongo-92ab73feba0c21ab49d101281c3cb6eab98d27dd.tar.gz |
SERVER-61662 Conftest logs should always be verbose.
(cherry picked from commit ec7eabea754dae617393dbfa51ed8667b254ca1b)
-rw-r--r-- | SConstruct | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct index c03361066b2..ceda985c349 100644 --- a/SConstruct +++ b/SConstruct @@ -1524,14 +1524,32 @@ if not env.TargetOSIs('windows'): env["CXXCOM"] = env["CXXCOM"].replace("$CCFLAGS", "$CCFLAGS $PROGCCFLAGS") env["LINKCOM"] = env["LINKCOM"].replace("$LINKFLAGS", "$LINKFLAGS $PROGLINKFLAGS") +class ForceVerboseConftest(): + """ + This class allows for configurable substition calls to enable forcing + the conftest to use verbose logs even when verbose mode is not specified. + """ + def __init__(self, msg): + self.msg = msg + + def __call__(self, target, source, env, for_signature): + for t in target: + # TODO: SERVER-60915 switch to SCons api conftest check + if 'conftest' in str(t): + return None + return self.msg + if not env.Verbose(): - env.Append( CCCOMSTR = "Compiling $TARGET" ) - env.Append( CXXCOMSTR = env["CCCOMSTR"] ) - env.Append( SHCCCOMSTR = "Compiling $TARGET" ) - env.Append( SHCXXCOMSTR = env["SHCCCOMSTR"] ) - env.Append( LINKCOMSTR = "Linking $TARGET" ) - env.Append( SHLINKCOMSTR = env["LINKCOMSTR"] ) - env.Append( ARCOMSTR = "Generating library $TARGET" ) + # Even though we are not in Verbose mode, conftest logs should + # always be verbose, because they go to a file and not seen + # by the user anyways. + env.Append( CCCOMSTR = ForceVerboseConftest("Compiling $TARGET") ) + env.Append( CXXCOMSTR = ForceVerboseConftest(env["CCCOMSTR"] ) ) + env.Append( SHCCCOMSTR = ForceVerboseConftest("Compiling $TARGET" ) ) + env.Append( SHCXXCOMSTR = ForceVerboseConftest(env["SHCCCOMSTR"] ) ) + env.Append( LINKCOMSTR = ForceVerboseConftest("Linking $TARGET" ) ) + env.Append( SHLINKCOMSTR = ForceVerboseConftest(env["LINKCOMSTR"] ) ) + env.Append( ARCOMSTR = ForceVerboseConftest("Generating library $TARGET" ) ) # Link tools other than mslink don't setup TEMPFILE in LINKCOM, # disabling SCons automatically falling back to a temp file when |