nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/SConstruct b/SConstruct
2index 4ec07a36a51..0010dcb6d27 100644
3--- a/SConstruct
4+++ b/SConstruct
5@@ -3535,33 +3535,6 @@ def doConfigure(myenv):
6 myenv.AddMethod(
7 functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported")
8
9- if myenv.ToolchainIs('gcc', 'clang'):
10- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker
11- # because it is much faster. Don't use it if the user has already configured another linker
12- # selection manually.
13- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']):
14- myenv.FatalError(
15- f"Use the '--linker' option instead of modifying the LINKFLAGS directly.")
16-
17- linker_ld = get_option('linker')
18- if linker_ld == 'auto':
19- if not env.TargetOSIs('darwin', 'macOS'):
20- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
21- myenv.FatalError(
22- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'."
23- )
24- elif link_model.startswith("dynamic") and linker_ld == 'bfd':
25- # BFD is not supported due to issues with it causing warnings from some of
26- # the third party libraries that mongodb is linked with:
27- # https://jira.mongodb.org/browse/SERVER-49465
28- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.")
29- else:
30- if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'):
31- myenv.FatalError(f"Linker {linker_ld} could not be configured.")
32-
33- if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'):
34- myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single'])
35-
36 detectCompiler = Configure(
37 myenv,
38 help=False,