Commit 0eb298a 1 parent 5333b87 commit 0eb298a Copy full SHA for 0eb298a
File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,15 @@ impl Step for Std {
161
161
// The LLD wrappers and `rust-lld` are self-contained linking components that can be
162
162
// necessary to link the stdlib on some targets. We'll also need to copy these binaries to
163
163
// the `stage0-sysroot` to ensure the linker is found when bootstrapping on such a target.
164
- if compiler. stage == 0 && compiler. host == builder. config . build {
164
+ let src_sysroot_bin = builder
165
+ . rustc_snapshot_sysroot ( )
166
+ . join ( "lib" )
167
+ . join ( "rustlib" )
168
+ . join ( compiler. host . triple )
169
+ . join ( "bin" ) ;
170
+ if compiler. stage == 0 && compiler. host == builder. config . build && src_sysroot_bin. exists ( )
171
+ {
165
172
// We want to copy the host `bin` folder within the `rustlib` folder in the sysroot.
166
- let src_sysroot_bin = builder
167
- . rustc_snapshot_sysroot ( )
168
- . join ( "lib" )
169
- . join ( "rustlib" )
170
- . join ( & compiler. host . triple )
171
- . join ( "bin" ) ;
172
173
let target_sysroot_bin =
173
174
builder. sysroot_libdir ( compiler, target) . parent ( ) . unwrap ( ) . join ( "bin" ) ;
174
175
t ! ( fs:: create_dir_all( & target_sysroot_bin) ) ;
You can’t perform that action at this time.
0 commit comments