From edf4ab0f81741a3788e17d2a1009ea935ef639c2 Mon Sep 17 00:00:00 2001 From: Andrew Morrow Date: Mon, 14 Oct 2019 17:52:03 +0000 Subject: [PATCH] SERVER-43979 Prefer lld when available --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 683a07a836b4..398f2caf6947 100644 --- a/SConstruct +++ b/SConstruct @@ -2821,10 +2821,13 @@ 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']): - if AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold'): + if AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=lld') or AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold'): if link_model.startswith("dynamic"): AddToLINKFLAGSIfSupported(myenv, '-Wl,--gdb-index') + # Our build is already parallel. + AddToLINKFLAGSIfSupported(myenv, '-Wl,--no-threads') + # Explicitly enable GNU build id's if the linker supports it. AddToLINKFLAGSIfSupported(myenv, '-Wl,--build-id')