populate the target_config now before its usage and update the test accordingly

This commit is contained in:
bit-aloo 2025-07-18 15:46:00 +05:30
parent e466296627
commit 4e53043395
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -1638,6 +1638,7 @@ mod snapshot {
.render_steps(), @r"
[build] llvm <host>
[build] rustc 0 <host> -> rustc 1 <host>
[build] rustc 0 <host> -> LldWrapper 1 <host>
[build] rustdoc 0 <host>
[doc] std 1 <host> crates=[core]
");
@ -1653,6 +1654,7 @@ mod snapshot {
.render_steps(), @r"
[build] llvm <host>
[build] rustc 0 <host> -> rustc 1 <host>
[build] rustc 0 <host> -> LldWrapper 1 <host>
[build] rustdoc 0 <host>
[doc] std 1 <host> crates=[alloc,core]
");

View file

@ -942,6 +942,7 @@ impl Config {
config.rust_profile_use = flags_rust_profile_use;
config.rust_profile_generate = flags_rust_profile_generate;
config.apply_target_config(toml.target);
config.apply_rust_config(toml.rust, flags_warnings);
config.reproducible_artifacts = flags_reproducible_artifact;
@ -967,8 +968,6 @@ impl Config {
config.apply_gcc_config(toml.gcc);
config.apply_target_config(toml.target);
match ccache {
Some(StringOrBool::String(ref s)) => config.ccache = Some(s.to_string()),
Some(StringOrBool::Bool(true)) => {