@@ -546,14 +546,27 @@ impl Config {
546
546
exclude : build_exclude_toml,
547
547
} = toml. build . unwrap_or_default ( ) ;
548
548
549
+ let Install {
550
+ prefix : install_prefix_toml,
551
+ sysconfdir : install_sysconfdir_toml,
552
+ docdir : install_docdir_toml,
553
+ bindir : install_bindir_toml,
554
+ libdir : install_libdir_toml,
555
+ mandir : install_mandir_toml,
556
+ datadir : install_datadir_toml,
557
+ } = toml. install . unwrap_or_default ( ) ;
558
+
549
559
if cfg ! ( test) {
550
560
// When configuring bootstrap for tests, make sure to set the rustc and Cargo to the
551
561
// same ones used to call the tests (if custom ones are not defined in the toml). If we
552
562
// don't do that, bootstrap will use its own detection logic to find a suitable rustc
553
563
// and Cargo, which doesn't work when the caller is specìfying a custom local rustc or
554
564
// Cargo in their bootstrap.toml.
555
- build_rustc_toml = build_rustc_toml. take ( ) . or ( std:: env:: var_os ( "RUSTC" ) . map ( |p| p. into ( ) ) ) ;
556
- build_build_toml = build_build_toml. take ( ) . or ( std:: env:: var_os ( "CARGO" ) . map ( |p| p. into_string ( ) . unwrap ( ) ) ) ;
565
+ build_rustc_toml =
566
+ build_rustc_toml. take ( ) . or ( std:: env:: var_os ( "RUSTC" ) . map ( |p| p. into ( ) ) ) ;
567
+ build_build_toml = build_build_toml
568
+ . take ( )
569
+ . or ( std:: env:: var_os ( "CARGO" ) . map ( |p| p. into_string ( ) . unwrap ( ) ) ) ;
557
570
}
558
571
559
572
build_jobs_toml = flags_jobs. or ( build_jobs_toml) ;
@@ -755,16 +768,6 @@ impl Config {
755
768
// Verbose flag is a good default for `rust.verbose-tests`.
756
769
config. verbose_tests = config. is_verbose ( ) ;
757
770
758
- let Install {
759
- prefix : install_prefix_toml,
760
- sysconfdir : install_sysconfdir_toml,
761
- docdir : install_docdir_toml,
762
- bindir : install_bindir_toml,
763
- libdir : install_libdir_toml,
764
- mandir : install_mandir_toml,
765
- datadir : install_datadir_toml,
766
- } = toml. install . unwrap_or_default ( ) ;
767
-
768
771
let install_prefix = install_prefix_toml. map ( PathBuf :: from) ;
769
772
let install_sysconfdir = install_sysconfdir_toml. map ( PathBuf :: from) ;
770
773
let install_docdir = install_docdir_toml. map ( PathBuf :: from) ;
0 commit comments