Skip to content

unable to build rust on tiers-3 platform #67624

New issue

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

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

Already on GitHub? # to your account

Closed
semarie opened this issue Dec 26, 2019 · 1 comment · Fixed by #67636
Closed

unable to build rust on tiers-3 platform #67624

semarie opened this issue Dec 26, 2019 · 1 comment · Fixed by #67636
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Comments

@semarie
Copy link
Contributor

semarie commented Dec 26, 2019

with the introduction of #65939, the bootstrap.py mandatories the use of downloaded rustfmt. but all platforms doesn't have binary distribution, mainly tiers-3 platforms like OpenBSD.

For rustc or cargo dependencies, it is possible to use config.toml (with rustc and cargo key in [build] section) to point to alternate binaries. this way, bootstrap.py doesn't download them and use local supplied binaries.

For rustfmt it is currently not possible: if bootstrap.py is able to deal with it, rustbuild will complains that rustfmt isn't a valid key:

failed to parse TOML configuration 'config.toml': unknown field `rustfmt`, expected one of `build`, `host`, `target`, `cargo`, `rustc`, `docs`, `
compiler-docs`, `submodules`, `fast-submodules`, `gdb`, `nodejs`, `python`, `locked-deps`, `vendor`, `full-bootstrap`, `extended`, `tools`, `verb
ose`, `sanitizers`, `profiler`, `cargo-native-static`, `low-priority`, `configure-args`, `local-rebuild`, `print-step-timings` for key `build` at
 line 26 column 1

What would be the right way to use a local rustfmt binary in order to copte with #65939, and not force the use of downloaded binary ?

Would adding a rustfmt key in [build] section of config.toml would be accepted (I could provide a patch of it, if yes) ? or should another method used ?

Cc @anp @Mark-Simulacrum

@estebank estebank added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Dec 26, 2019
@Mark-Simulacrum
Copy link
Member

Yes, that was on oversight on my part. I would be happy to review a patch adding it to config.toml.

You should also be able to comment out the line in stage0.txt as a (possibly) temporary fix, this is my plan for beta and stable branches FWIW.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jan 2, 2020
…imulacrum

allow rustfmt key in [build] section

Permit using `rustfmt` in `config.toml`. It will allow to not download `rustfmt` binary, which is not possible for at least some tiers-3 platforms.

Fixes: rust-lang#67624

r? @Mark-Simulacrum
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jan 2, 2020
…imulacrum

allow rustfmt key in [build] section

Permit using `rustfmt` in `config.toml`. It will allow to not download `rustfmt` binary, which is not possible for at least some tiers-3 platforms.

Fixes: rust-lang#67624

r? @Mark-Simulacrum
@bors bors closed this as completed in 9dd2c9e Jan 3, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants