tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Dropping tsort for archive creation
Hi all,
in the old days, sorting archive members topologically helped to improve
build time. I don't think it provides a significant advantage anymore as
most systems will keep the archives in memory during linking and lookup
is generally helped by the index. Newer linkers like gold, lld or
mclinker or designed to build an in-memory index as well to allow
single pass processing of archives. As such, I want to propose getting
rid of the complexity. Trying it on my laptop saves 30s (of about 1h),
so change is pretty much in the noise. Comments?
Joerg
Index: bsd.lib.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/src/share/mk/bsd.lib.mk,v
retrieving revision 1.358
diff -u -p -r1.358 bsd.lib.mk
--- bsd.lib.mk 4 Jun 2015 06:01:24 -0000 1.358
+++ bsd.lib.mk 2 Jul 2015 22:00:14 -0000
@@ -542,7 +542,7 @@ _INSTRANLIB=${empty(PRESERVE):?-a "${RAN
__archivebuild: .USE
${_MKTARGET_BUILD}
rm -f ${.TARGET}
- ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+ ${AR} ${_ARFL} ${.TARGET} ${.ALLSRC:M*o:O}
.endif
.if !target(__archiveinstall)
Home |
Main Index |
Thread Index |
Old Index