Page MenuHomeFreeBSD

Add WITH_/WITHOUT_LLD knobs to enable the lld linker
ClosedPublic

Authored by emaste on Aug 31 2016, 12:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 1:03 PM
Unknown Object (File)
Dec 22 2023, 10:18 PM
Unknown Object (File)
Nov 14 2023, 12:23 PM
Unknown Object (File)
Nov 11 2023, 10:46 PM
Unknown Object (File)
Nov 11 2023, 5:58 PM
Unknown Object (File)
Nov 9 2023, 2:32 AM
Unknown Object (File)
Nov 5 2023, 2:43 PM
Unknown Object (File)
Oct 19 2023, 11:39 PM
Subscribers

Details

Summary

Use this to control inclusion of the libllvm functionality required by lld. Enable by default on arm64 and amd64, the two platforms where lld is most usable for testing.

(Some additional functionality may have been added beyond the minimal required set. E.g. I added all of the LTO libs while it's possible only a subset is really needed. Probably not worth worrying about.)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to Add WITH_/WITHOUT_LLD knobs to enable the lld linker.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: dim.
emaste added a subscriber: db.
lib/clang/libllvm/Makefile
1117–1119 ↗(On Diff #19856)

Maybe this complexity isn't warranted and we should just add the lld requirements to SRCS_MIN?

And also this change:

diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile
index d560a8a..c6ba2b3 100644
--- a/usr.bin/clang/Makefile
+++ b/usr.bin/clang/Makefile
@@ -33,6 +33,9 @@ SUBDIR+=      llvm-symbolizer
 SUBDIR+=       opt
 .endif
 
+.if ${MK_LLD} != "no"
+SUBDIR+=       lld
+.endif
 .if ${MK_LLDB} != "no"
 SUBDIR+=       lldb
 .endif # MK_LLDB
share/mk/src.opts.mk
251–253 ↗(On Diff #19856)

For now it seems sensible to enable on amd64 (where lld is close to working) and arm64 (where we have no other linker in the base system), and perhaps add i386 and arm(32) when we bring in 4.0.

Perhaps we want to commit first with LLD as a default NO option and then follow up with a commit to enable on amd64 and arm64 to aid in the MFC process (i.e., plan to merge Clang/LLVM* 3.9 to stable/11 without turning LLD on by default).

This revision was automatically updated to reflect the committed changes.