Skip to content

Conversation

@karolzwolak
Copy link
Member

@karolzwolak karolzwolak commented Nov 10, 2025

Part of #148782; see also #148708

This makes easy to persistently pass any flag to the compiler when building rustc. For example you can use a different linker by putting the following in bootstrap.toml:

[rust]
rustflags = ["-Clinker=clang", "-Clink-arg=--ld-path=wild"]

r? bootstrap

This makes easy to persistently pass any flag to the compiler when building rustc.
For example you can use a different linker by putting the following in
`bootstrap.toml`:
```toml
[rust]
rustflags = ["-Clinker=clang", "-Clink-arg=--ld-path=wild"]
```
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 10, 2025
# desired in distributions, for example.
#rust.rpath = true

# Additional flags to pass to `rustc`. Passed after RUSTFLAGS env variable but before everything else.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure where in what order to exactly pass them. Is this ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants