Skip to content

Commit 7f20ad8

Browse files
committed
move dist and gcc config to the top of parse method
1 parent f74f1a0 commit 7f20ad8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,18 @@ impl Config {
643643
build_config: llvm_build_config_toml,
644644
} = toml.llvm.unwrap_or_default();
645645

646+
let Dist {
647+
sign_folder: dist_sign_folder_toml,
648+
upload_addr: dist_upload_addr_toml,
649+
src_tarball: dist_src_tarball_toml,
650+
compression_formats: dist_compression_formats_toml,
651+
compression_profile: dist_compression_profile_toml,
652+
include_mingw_linker: dist_include_mingw_linker_toml,
653+
vendor: dist_vendor_toml,
654+
} = toml.dist.unwrap_or_default();
655+
656+
let Gcc { download_ci_gcc: gcc_download_ci_gcc_toml } = toml.gcc.unwrap_or_default();
657+
646658
if cfg!(test) {
647659
// When configuring bootstrap for tests, make sure to set the rustc and Cargo to the
648660
// same ones used to call the tests (if custom ones are not defined in the toml). If we
@@ -1241,8 +1253,6 @@ impl Config {
12411253
config.llvm_link_shared.set(Some(true));
12421254
}
12431255

1244-
let Gcc { download_ci_gcc: gcc_download_ci_gcc_toml } = toml.gcc.unwrap_or_default();
1245-
12461256
config.gcc_ci_mode = match gcc_download_ci_gcc_toml {
12471257
Some(value) => match value {
12481258
true => GccCiMode::DownloadFromCi,
@@ -1275,16 +1285,6 @@ impl Config {
12751285
Some(ci_llvm_bin.join(exe("FileCheck", config.host_target)));
12761286
}
12771287

1278-
let Dist {
1279-
sign_folder: dist_sign_folder_toml,
1280-
upload_addr: dist_upload_addr_toml,
1281-
src_tarball: dist_src_tarball_toml,
1282-
compression_formats: dist_compression_formats_toml,
1283-
compression_profile: dist_compression_profile_toml,
1284-
include_mingw_linker: dist_include_mingw_linker_toml,
1285-
vendor: dist_vendor_toml,
1286-
} = toml.dist.unwrap_or_default();
1287-
12881288
config.dist_sign_folder = dist_sign_folder_toml.map(PathBuf::from);
12891289
config.dist_upload_addr = dist_upload_addr_toml;
12901290
config.dist_compression_formats = dist_compression_formats_toml;

0 commit comments

Comments
 (0)