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-01-24 22:34:03 +0000 |
commit | ec7eabea754dae617393dbfa51ed8667b254ca1b (patch) | |
tree | 50ab011adf510d4a1bf8ff05ae4d9b80b9839802 /SConstruct | |
parent | 021c3209622eb7e273e31424bdca2f70b964e1dc (diff) | |
download | mongo-ec7eabea754dae617393dbfa51ed8667b254ca1b.tar.gz |
SERVER-61662 Conftest logs should always be verbose.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct index 03b6d302f82..16c3b246af0 100644 --- a/SConstruct +++ b/SConstruct @@ -1813,14 +1813,32 @@ if not env.TargetOSIs('windows'): # following appends contents of SHLINKFLAGS_EXTRA variable to the linker command env.AppendUnique(SHLINKFLAGS=['$SHLINKFLAGS_EXTRA']) +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 |