diff options
| author | bors <bors@rust-lang.org> | 2025-03-17 15:51:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-17 15:51:28 +0000 |
| commit | 8279176ccdfd4eebd40a671f75b6d3024ae56b42 (patch) | |
| tree | 9211ac589843f4f8040e0310a6a15347e7ffcebf /src/tools | |
| parent | 9c67cecd12d79f1bbc00a74f70e7ef9fff086a5a (diff) | |
| parent | 4579615b14a3a2ee1a0040365d969d9526ed7e1c (diff) | |
| download | rust-8279176ccdfd4eebd40a671f75b6d3024ae56b42.tar.gz rust-8279176ccdfd4eebd40a671f75b6d3024ae56b42.zip | |
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?
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/compiletest/src/main.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/CONTRIBUTING.md | 2 | ||||
| -rw-r--r-- | src/tools/miri/cargo-miri/src/setup.rs | 2 | ||||
| -rw-r--r-- | src/tools/opt-dist/src/main.rs | 14 | ||||
| -rw-r--r-- | src/tools/opt-dist/src/tests.rs | 4 | ||||
| -rw-r--r-- | src/tools/rustdoc-gui-test/src/main.rs | 2 |
6 files changed, 17 insertions, 9 deletions
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 2f0c7d8ddc5..b9ae583581e 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -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`"# ); } diff --git a/src/tools/miri/CONTRIBUTING.md b/src/tools/miri/CONTRIBUTING.md index 5a08ac9af60..0d77ca06e1b 100644 --- a/src/tools/miri/CONTRIBUTING.md +++ b/src/tools/miri/CONTRIBUTING.md @@ -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 diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs index 0cf6f1a375c..7afc8481009 100644 --- a/src/tools/miri/cargo-miri/src/setup.rs +++ b/src/tools/miri/cargo-miri/src/setup.rs @@ -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 { diff --git a/src/tools/opt-dist/src/main.rs b/src/tools/opt-dist/src/main.rs index 3111149f2ae..ac5d294f07e 100644 --- a/src/tools/opt-dist/src/main.rs +++ b/src/tools/opt-dist/src/main.rs @@ -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); } }); diff --git a/src/tools/opt-dist/src/tests.rs b/src/tools/opt-dist/src/tests.rs index c8759bb6ff6..53ce772fa77 100644 --- a/src/tools/opt-dist/src/tests.rs +++ b/src/tools/opt-dist/src/tests.rs @@ -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(), diff --git a/src/tools/rustdoc-gui-test/src/main.rs b/src/tools/rustdoc-gui-test/src/main.rs index 5adb525d7e6..f1c6e13d3ae 100644 --- a/src/tools/rustdoc-gui-test/src/main.rs +++ b/src/tools/rustdoc-gui-test/src/main.rs @@ -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) } |
