Skip to content

Commit

Permalink
replace config.toml to bootstrap.toml in src:tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Shourya742 committed Feb 15, 2025
1 parent 8877ec1 commit 75d09e2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`"#
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/cargo-miri/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 11 additions & 3 deletions src/tools/opt-dist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/tools/opt-dist/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,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.
std::fs::write("config.toml", config_content)?;
std::fs::write("bootstrap.toml", config_content)?;

let x_py = env.checkout_path().join("x.py");
let mut args = vec![
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rustdoc-gui-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 75d09e2

Please sign in to comment.