Skip to content

rustbuild: implement per-stage target options #46318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tamird opened this issue Nov 27, 2017 · 4 comments
Closed

rustbuild: implement per-stage target options #46318

tamird opened this issue Nov 27, 2017 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@tamird
Copy link
Contributor

tamird commented Nov 27, 2017

Currently, it is possible to specify e.g. "linker", "cc", and others per target, but it is not possible to specify which stage those options apply to.

This is mostly useful when options should not apply stage 0.

@alexcrichton

@tamird
Copy link
Contributor Author

tamird commented Nov 27, 2017

I forgot to mention: I'm happy to work on this, I'm just not sure where to plumb the necessary bits.

@Mark-Simulacrum
Copy link
Member

I think the best way to integrate this would be to add sub-targets for each stage, so we'd have a section [target.x86_64-unknown-linux-gnu.stage1] or something like that.

My recommendation would be to implicitly create these from the base (non-stage specific) configurations in the config.toml when converting from TomlTarget. I think you'll have to possibly implement some custom logic for deserialization, but I hope it's not necessary.

Once the configuration changes are implemented, I would expect us to have not a target -> {cc, linker, etc.} list but basically target -> stage N -> {target, cc, ...}. This would then be used wherever we today use the per-target configs.

I can possibly provide more detailed instructions, but it'll take me more time -- let me know if you want that, and I'd be happy to answer any questions you have.

@Mark-Simulacrum Mark-Simulacrum added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 28, 2017
@TimNN TimNN added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Nov 28, 2017
@jyn514
Copy link
Member

jyn514 commented Jun 25, 2023

cc #112679, which is the same thing but for the rust section

@onur-ozkan
Copy link
Member

Closing as duplicated with #112679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants