summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2019-06-19 16:25:46 -0400
committerAndrew Morrow <acm@mongodb.com>2019-06-20 15:45:13 -0400
commita0a70c53cc7a2b1f5bf4cfe48df7ca3b4a62a898 (patch)
tree9a167db49199a1ccda6e387ef963547f5503d8b0 /SConstruct
parentfdb157dac0548068776f1b5fac968b412cd5b08e (diff)
downloadmongo-a0a70c53cc7a2b1f5bf4cfe48df7ca3b4a62a898.tar.gz
SERVER-41827 Build GDB indexes for binaries when using ld.gold in dynamic mode
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 3 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 024199d18d6..609388fb1ba 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2761,7 +2761,9 @@ def doConfigure(myenv):
# 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')
+ if AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold'):
+ if link_model.startswith("dynamic"):
+ AddToLINKFLAGSIfSupported(myenv, '-Wl,--gdb-index')
# Explicitly enable GNU build id's if the linker supports it.
AddToLINKFLAGSIfSupported(myenv, '-Wl,--build-id')