@@ -17,7 +17,7 @@ pub(crate) fn build_sysroot(
1717 channel : & str ,
1818 sysroot_kind : SysrootKind ,
1919 cg_clif_dylib_src : & Path ,
20- host_compiler : & Compiler ,
20+ bootstrap_host_compiler : & Compiler ,
2121 target_triple : & str ,
2222) {
2323 eprintln ! ( "[BUILD] sysroot {:?}" , sysroot_kind) ;
@@ -53,7 +53,8 @@ pub(crate) fn build_sysroot(
5353
5454 let default_sysroot = super :: rustc_info:: get_default_sysroot ( ) ;
5555
56- let host_rustlib_lib = RUSTLIB_DIR . to_path ( dirs) . join ( & host_compiler. triple ) . join ( "lib" ) ;
56+ let host_rustlib_lib =
57+ RUSTLIB_DIR . to_path ( dirs) . join ( & bootstrap_host_compiler. triple ) . join ( "lib" ) ;
5758 let target_rustlib_lib = RUSTLIB_DIR . to_path ( dirs) . join ( target_triple) . join ( "lib" ) ;
5859 fs:: create_dir_all ( & host_rustlib_lib) . unwrap ( ) ;
5960 fs:: create_dir_all ( & target_rustlib_lib) . unwrap ( ) ;
@@ -83,7 +84,11 @@ pub(crate) fn build_sysroot(
8384 SysrootKind :: None => { } // Nothing to do
8485 SysrootKind :: Llvm => {
8586 for file in fs:: read_dir (
86- default_sysroot. join ( "lib" ) . join ( "rustlib" ) . join ( & host_compiler. triple ) . join ( "lib" ) ,
87+ default_sysroot
88+ . join ( "lib" )
89+ . join ( "rustlib" )
90+ . join ( & bootstrap_host_compiler. triple )
91+ . join ( "lib" ) ,
8792 )
8893 . unwrap ( )
8994 {
@@ -103,7 +108,7 @@ pub(crate) fn build_sysroot(
103108 try_hard_link ( & file, host_rustlib_lib. join ( file. file_name ( ) . unwrap ( ) ) ) ;
104109 }
105110
106- if target_triple != host_compiler . triple {
111+ if target_triple != bootstrap_host_compiler . triple {
107112 for file in fs:: read_dir (
108113 default_sysroot. join ( "lib" ) . join ( "rustlib" ) . join ( target_triple) . join ( "lib" ) ,
109114 )
@@ -118,19 +123,19 @@ pub(crate) fn build_sysroot(
118123 build_clif_sysroot_for_triple (
119124 dirs,
120125 channel,
121- host_compiler . clone ( ) ,
126+ bootstrap_host_compiler . clone ( ) ,
122127 & cg_clif_dylib_path,
123128 ) ;
124129
125- if host_compiler . triple != target_triple {
130+ if bootstrap_host_compiler . triple != target_triple {
126131 build_clif_sysroot_for_triple (
127132 dirs,
128133 channel,
129134 {
130- let mut target_compiler = host_compiler . clone ( ) ;
131- target_compiler . triple = target_triple. to_owned ( ) ;
132- target_compiler . set_cross_linker_and_runner ( ) ;
133- target_compiler
135+ let mut bootstrap_target_compiler = bootstrap_host_compiler . clone ( ) ;
136+ bootstrap_target_compiler . triple = target_triple. to_owned ( ) ;
137+ bootstrap_target_compiler . set_cross_linker_and_runner ( ) ;
138+ bootstrap_target_compiler
134139 } ,
135140 & cg_clif_dylib_path,
136141 ) ;
0 commit comments