Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 63 lines 3.0 kB view raw
1diff --git a/SConstruct b/SConstruct 2index 07579349b83..68a26f26a49 100644 3--- a/SConstruct 4+++ b/SConstruct 5@@ -23,7 +23,6 @@ from pkg_resources import parse_version 6 7 import SCons 8 import SCons.Script 9-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics 10 from site_scons.mongo import build_profiles 11 12 # This must be first, even before EnsureSConsVersion, if 13@@ -1653,16 +1652,6 @@ env = Environment(variables=env_vars, **envDict) 14 del envDict 15 env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption') 16 17-# The placement of this is intentional. Here we setup an atexit method to store tooling metrics. 18-# We should only register this function after env, env_vars and the parser have been properly initialized. 19-SConsToolingMetrics.register_metrics( 20- utc_starttime=datetime.utcnow(), 21- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(), 22- env_vars=env_vars, 23- env=env, 24- parser=_parser, 25-) 26- 27 if get_option('build-metrics'): 28 env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR' 29 env.Tool('build_metrics') 30@@ -3549,33 +3538,6 @@ def doConfigure(myenv): 31 myenv.AddMethod( 32 functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported") 33 34- if myenv.ToolchainIs('gcc', 'clang'): 35- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker 36- # because it is much faster. Don't use it if the user has already configured another linker 37- # selection manually. 38- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']): 39- myenv.FatalError( 40- f"Use the '--linker' option instead of modifying the LINKFLAGS directly.") 41- 42- linker_ld = get_option('linker') 43- if linker_ld == 'auto': 44- if not env.TargetOSIs('darwin', 'macOS'): 45- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'): 46- myenv.FatalError( 47- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'." 48- ) 49- elif link_model.startswith("dynamic") and linker_ld == 'bfd': 50- # BFD is not supported due to issues with it causing warnings from some of 51- # the third party libraries that mongodb is linked with: 52- # https://jira.mongodb.org/browse/SERVER-49465 53- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.") 54- else: 55- if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'): 56- myenv.FatalError(f"Linker {linker_ld} could not be configured.") 57- 58- if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'): 59- myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single']) 60- 61 detectCompiler = Configure( 62 myenv, 63 help=False,