Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/57173 )

Change subject: scons: Add a "mold" value to the --linker option.
......................................................................

scons: Add a "mold" value to the --linker option.

This new and improved linker approximately halves link time for
build/X86/gem5.opt for me compared to lld, the previously fastest
linker. The -fuse-ld=mold option is supported by current versions of
clang, and will be supported in gcc 12.

To use the mold linker with gcc prior to version 12, you need to set
the LINKFLAGS_EXTRA scons variable to pass in a -B option as described
on this page:

https://github.com/rui314/mold

Change-Id: Ic5ad0e532fac078d384a0aebb3e04a4b04ce4880
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57173
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Earl Ou <shunhsin...@google.com>
---
M SConstruct
1 file changed, 26 insertions(+), 1 deletion(-)

Approvals:
  Earl Ou: Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/SConstruct b/SConstruct
index 93b421e..679315e 100755
--- a/SConstruct
+++ b/SConstruct
@@ -98,7 +98,7 @@
 #
 ########################################################################

-linker_options = ('bfd', 'gold', 'lld')
+linker_options = ('bfd', 'gold', 'lld', 'mold')

 AddOption('--no-colors', dest='use_colors', action='store_false',
           help="Don't add color to abbreviated scons output")

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57173
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ic5ad0e532fac078d384a0aebb3e04a4b04ce4880
Gerrit-Change-Number: 57173
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Earl Ou <shunhsin...@google.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to