Skip to content

config.toml.example: wasi-root field is in a wrong section #82317

Closed
@osa1

Description

@osa1

The wasi-root field needs to be in section target.wasm32-wasi, but in config.toml.example it's in target.x86_64-unknown-linux-gnu section. Just enabling wasi-root causes an unhelpful error message.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/bootstrap/compile.rs:193:48
stack backtrace:
   0: rust_begin_unwind
             at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/panicking.rs:50:5
   3: core::option::Option<T>::unwrap
             at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/option.rs:386:21
   4: bootstrap::compile::copy_self_contained_objects
             at ./src/bootstrap/compile.rs:193:22
   5: <bootstrap::compile::Std as bootstrap::builder::Step>::run
             at ./src/bootstrap/compile.rs:95:28
   6: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:1529:23
   7: <bootstrap::compile::Std as bootstrap::builder::Step>::make_run
             at ./src/bootstrap/compile.rs:51:9
   8: bootstrap::builder::StepDescription::maybe_run
             at ./src/bootstrap/builder.rs:197:13
   9: bootstrap::builder::StepDescription::run
             at ./src/bootstrap/builder.rs:238:21
  10: bootstrap::builder::Builder::run_step_descriptions
             at ./src/bootstrap/builder.rs:587:9
  11: bootstrap::builder::Builder::execute_cli
             at ./src/bootstrap/builder.rs:579:9
  12: bootstrap::Build::build
             at ./src/bootstrap/lib.rs:506:17
  13: bootstrap::main
             at ./src/bootstrap/bin/main.rs:33:5
  14: core::ops::function::FnOnce::call_once
             at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failed to run: /home/omer/rust/rust/build/bootstrap/debug/bootstrap build --stage 1 library/std

If having a wasm32-wasi section always in the example config file is fine then we could move the section and wasi-root field right before the beginning of next section (e.g. [dist]). So the config.toml.example would look like:

...
[target.wasm32-wasi]

# The root location of the `wasm32-wasi` sysroot.
# wasi-root = "..."

[dist]
...

Metadata

Metadata

Assignees

Labels

T-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