-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
config.toml parsing error improvements #82360
Conversation
This comment has been minimized.
This comment has been minimized.
I think specifying a different llvm-config for different targets doesn't make sense, right? So perhaps this key should be in |
llvm-config can be different for different targets, if e.g. you are targeting 64-bit and 32-bit systems. I think adding a commented one to the wasi section is probably easiest - even if compiling LLVM for wasm32-wasi seems unlikely :) |
I'm surprised that this works. Does LLVM allow linking multiple version in the single binary? If not, I don't see how this can work.
config.toml.example is already quite large. I'm thinking of reverting the changes to change.toml.example and just committing the improved errors messages. Would that work? |
Note that we produce a single rustc per target, so there's not actually multiple LLVMs getting linked in. But if I'm producing compilers for, say, both 32-bit and 64-bit windows, those'll need two different LLVMs (just like the Rust code needs to be built twice). I would be happy to just add the improved error messages, but we can also add a note on the wasi-root in config.toml.example indicating that it likely wants to get set for the wasi target. |
Improve error messages for musl-libdir and wasi-root keys. Previously the parser would panic with `unwrap()`. Now it prints Target "wasm32-wasi" does not have a "wasi-root" key (and similar for the `musl-libdir` field, which is used in target that use musl) Also update comments around wasi-root field to make it clear that the field is only valid in wasm32-wasi target and needs to be moved to a `[target.wasm32-wasi]` section to be valid. Fixes rust-lang#82317
@Mark-Simulacrum OK, that makes sense. I updated the PR. @rustbot label -S-waiting-on-author +S-waiting-on-review |
@bors r+ rollup |
📌 Commit 81cfa98 has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#81210 (BTreeMap: correct node size test case for choices of B) - rust-lang#82360 (config.toml parsing error improvements) - rust-lang#82428 (Update mdbook) - rust-lang#82480 (Remove `ENABLE_DOWNLOAD_RUSTC` constant) - rust-lang#82578 (Add some diagnostic items for Clippy) - rust-lang#82620 (Apply lint restrictions from renamed lints) - rust-lang#82635 (Fix typos in rustc_infer::infer::nll_relate) - rust-lang#82645 (Clarify that SyncOnceCell::set blocks.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Improve error messages for musl-libdir and wasi-root keys. Previously
the parser would panic with
unwrap()
. Now it prints(and similar for the
musl-libdir
field, which is used in target thatuse musl)
Also update comments around wasi-root field to make it clear that the
field is only valid in wasm32-wasi target and needs to be moved to a
[target.wasm32-wasi]
section to be valid.Fixes #82317
r? @Mark-Simulacrum