Closed
Description
Currently x.py has some very strange behavior around config.toml.
- If
--config
andRUST_BOOSTRAP_CONFIG
are unset, it will assume the file to use is./config.toml
in the current directory, even if it doesn't exist. - If either --config or RUST_BOOTSTRAP are set to a relative path, it will first look in the current directory, then fall back to the root directory if the file doesn't exist.
https://github.com/rust-lang/rust/blob/be18e614ee5ec5bb4972516f82035215f4814ac1/src/bootstrap/bootstrap.py#L1243
We should make these consistent and fall back to the root directory for the default path as well. @pnkfelix has mentioned in the past they use per-directory config.toml files, but this wouldn't break that workflow - the only thing that would change is that "switch to a new directory to get a blank build + config" would have to also run touch config.toml
.
cc @Mark-Simulacrum
@rustbot label: +A-rustbuild +C-enhancement