Skip to content

Use a faster linker by default in the compiler profile #103541

Open
@Noratrieb

Description

@Noratrieb

By default for the compiler profile, we use the default system linker to compile the compiler. While this is the easiest solution that will work in the most cases, it's usually rather slow.

There is a rust.use-lld option in config.toml which can significantly speed up incremental builds and should be on by default.

This will work fine on Linux and should also work fine on Windows, but LLD on MacOS isn't well maintained and has issues so it should not be used by default. A better option here would be zld (there are two zlds out there, this is the right one). On Linux (and on MacOS once it's released), we may also be able to use mold, which is even faster and could make another difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesT-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