Auto merge of #137081 - Shourya742:2025-02-15-change-config.toml-to-bootstrap.toml, r=onur-ozkan,jieyouxu,kobzol

change config.toml to bootstrap.toml

Currently, both Bootstrap and Cargo uses same name as their configuration file, which can be confusing. This PR is based on a discussion to rename `config.toml` to `bootstrap.toml` for Bootstrap. Closes: https://github.com/rust-lang/rust/issues/126875.

I have split the PR into atomic commits to make it easier to review. Once the changes are finalized, I will squash them. I am particularly concerned about the changes made to modules that are not part of Bootstrap. How should we handle those changes? Should we ping the respective maintainers?
This commit is contained in:
bors 2025-03-17 15:51:28 +00:00
commit 8279176ccd
125 changed files with 570 additions and 532 deletions

View file

@ -27,7 +27,7 @@ fn main() {
eprintln!(
r#"
WARNING: profiler runtime is not available, so `.coverage` files won't be {actioned}
help: try setting `profiler = true` in the `[build]` section of `config.toml`"#
help: try setting `profiler = true` in the `[build]` section of `bootstrap.toml`"#
);
}

View file

@ -153,7 +153,7 @@ MIRI_LOG=rustc_mir::interpret=info,miri::stacked_borrows ./miri run tests/pass/v
Note that you will only get `info`, `warn` or `error` messages if you use a prebuilt compiler.
In order to get `debug` and `trace` level messages, you need to build miri with a locally built
compiler that has `debug=true` set in `config.toml`.
compiler that has `debug=true` set in `bootstrap.toml`.
#### Debugging error messages

View file

@ -115,7 +115,7 @@ pub fn setup(
// https://github.com/rust-lang/miri/issues/1421,
// https://github.com/rust-lang/miri/issues/2429). Looks like setting
// `RUSTC_WRAPPER` to the empty string overwrites `build.rustc-wrapper` set via
// `config.toml`.
// `bootstrap.toml`.
command.env("RUSTC_WRAPPER", "");
if show_setup {

View file

@ -369,9 +369,17 @@ fn main() -> anyhow::Result<()> {
println!("Environment values\n{}", format_env_variables());
});
with_log_group("Printing config.toml", || {
if let Ok(config) = std::fs::read_to_string("config.toml") {
println!("Contents of `config.toml`:\n{config}");
with_log_group("Printing bootstrap.toml", || {
let config_file = if std::path::Path::new("bootstrap.toml").exists() {
"bootstrap.toml"
} else {
"config.toml" // Fall back for backward compatibility
};
if let Ok(config) = std::fs::read_to_string(config_file) {
println!("Contents of `bootstrap.toml`:\n{config}");
} else {
eprintln!("Failed to read `{}`", config_file);
}
});

View file

@ -85,10 +85,10 @@ llvm-config = "{llvm_config}"
cargo = cargo_path.to_string().replace('\\', "/"),
llvm_config = llvm_config.to_string().replace('\\', "/")
);
log::info!("Using following `config.toml` for running tests:\n{config_content}");
log::info!("Using following `bootstrap.toml` for running tests:\n{config_content}");
// Simulate a stage 0 compiler with the extracted optimized dist artifacts.
with_backed_up_file(Path::new("config.toml"), &config_content, || {
with_backed_up_file(Path::new("bootstrap.toml"), &config_content, || {
let x_py = env.checkout_path().join("x.py");
let mut args = vec![
env.python_binary(),

View file

@ -20,7 +20,7 @@ fn get_browser_ui_test_version_inner(npm: &Path, global: bool) -> Option<String>
Err(e) => {
eprintln!(
"path to npm can be wrong, provided path: {npm:?}. Try to set npm path \
in config.toml in [build.npm]",
in bootstrap.toml in [build.npm]",
);
panic!("{:?}", e)
}