diff options
author | Andrew Morrow <acm@mongodb.com> | 2017-04-01 11:01:20 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-04-03 23:45:25 -0400 |
commit | 034d01df1ee4c8f56b2dc181e21abf6ac0a80ee0 (patch) | |
tree | 90fc9526fadfce679aaefcfa3c72bd8f65899c60 /SConstruct | |
parent | 925e245ca4cb59fdec3c008097df612fd48ae00a (diff) | |
download | mongo-034d01df1ee4c8f56b2dc181e21abf6ac0a80ee0.tar.gz |
SERVER-28021 Only prefer gold if not explicitly overridden
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index b96e516aace..d71a68393f0 100644 --- a/SConstruct +++ b/SConstruct @@ -2466,8 +2466,10 @@ def doConfigure(myenv): if myenv.ToolchainIs('gcc', 'clang'): # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker - # because it is much faster. - AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') + # because it is much faster. Don't use it if the user has already configured another linker + # selection manually. + if not any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']): + AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') # Explicitly enable GNU build id's if the linker supports it. AddToLINKFLAGSIfSupported(myenv, '-Wl,--build-id') |