Page MenuHomeFreeBSD

Introduce LLD_BOOTSTRAP to control lld as bootstrap linker
ClosedPublic

Authored by emaste on Apr 3 2017, 1:23 PM.
Tags
None
Referenced Files
F132578051: D10249.id.diff
Sat, Oct 18, 3:17 AM
Unknown Object (File)
Thu, Oct 16, 4:18 AM
Unknown Object (File)
Wed, Oct 1, 6:04 PM
Unknown Object (File)
Wed, Oct 1, 3:29 PM
Unknown Object (File)
Wed, Oct 1, 12:53 PM
Unknown Object (File)
Aug 24 2025, 11:38 PM
Unknown Object (File)
Aug 23 2025, 12:15 AM
Unknown Object (File)
Aug 13 2025, 11:13 AM
Subscribers

Details

Summary

Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs similar to the Clang bootstrap ones.

The three knobs are:

WITH_LLD -> Builds /usr/bin/ld.lld
WITH_LLD_BOOTSTRAP -> lld is used as the buildworld linker
WITH_LLD_IS_LD -> The installed /usr/bin/ld is a symlink to ld.lld

This is a work in progress, initially posted for confirmation that these knobs are the desired approach.

Diff Detail

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

Event Timeline

Makefile.inc1
1667–1670 ↗(On Diff #26955)

@dim: this could be tightened up later (e.g. we don't need clang-tblgen to build lld), but I think it's fine at first to build more than is strictly necessary, since building LLD without Clang is probably a rather unlikely combination. Do you agree, or do you think I should try to handle that case with as little built as possible?

dim added inline comments.
Makefile.inc1
1667 ↗(On Diff #26955)

s/llld/lld/ here.

1667–1670 ↗(On Diff #26955)

Indeed, we don't have separate bootstrap targets for llvm-tblgen and clang-tblgen, but we can do that later. For now this is OK. The additional build time for clang-tblgen is not terribly huge, since it has just 9 .cpp files.

1845 ↗(On Diff #26955)

It's similar here, really. For lld itself you only need libllvm, but building lld and not clang is a very uncommon use case, which can be optimized for later.

This revision is now accepted and ready to land.Apr 8 2017, 9:44 PM
This revision was automatically updated to reflect the committed changes.