Skip to content

Change how LLD is configured in bootstrap.toml #146640

@Kobzol

Description

@Kobzol

Currently, the way LLD (and using it as a default linker for a given target) is configured in bootstrap is a big mess. We have:

  • rust.use-lld, which tells bootstrap to use LLD when building local Rust components, so it is only relevant for bootstrapping and faster local (re)builds.
  • rust.lld, which both:
    • Tells bootstrap to build LLD and include it in the built rustc's sysroot
    • Tells rustc to use rust-lld by default (ONLY on x86_64-unknown-linux-gnu)
  • rust.default-linker, which changes the default linker to be used by rustc, but this does not work on Linux, which is why we used the rust.lld hack above

I would suggest the following, based on prior discussions in #146604 and other PRs:

We should keep the old options for some time, to keep backwards compatibility.

Metadata

Metadata

Assignees

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions