Gabe Black has uploaded this change for review. ( 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
---
M SConstruct
1 file changed, 21 insertions(+), 1 deletion(-)



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: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
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