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
Unknown Object (File)
Tue, Apr 2, 7:12 PM
Unknown Object (File)
Mar 7 2024, 11:44 AM
Unknown Object (File)
Feb 24 2024, 10:55 AM
Unknown Object (File)
Dec 20 2023, 7:22 AM
Unknown Object (File)
Dec 13 2023, 3:46 AM
Unknown Object (File)
Nov 21 2023, 7:48 AM
Unknown Object (File)
Oct 28 2023, 8:11 AM
Unknown Object (File)
Oct 20 2023, 11:11 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.