@@ -48,9 +48,6 @@ pub struct TargetInfo {
48
48
support_split_debuginfo : Vec < String > ,
49
49
/// Path to the sysroot.
50
50
pub sysroot : PathBuf ,
51
- /// Path to the "lib" or "bin" directory that rustc uses for its dynamic
52
- /// libraries.
53
- pub sysroot_host_libdir : PathBuf ,
54
51
/// Path to the "lib" directory in the sysroot which rustc uses for linking
55
52
/// target libraries.
56
53
pub sysroot_target_libdir : PathBuf ,
@@ -224,19 +221,17 @@ impl TargetInfo {
224
221
return error_missing_print_output ( "sysroot" , & process, & output, & error) ;
225
222
} ;
226
223
let sysroot = PathBuf :: from ( line) ;
227
- let sysroot_host_libdir = if cfg ! ( windows) {
228
- sysroot. join ( "bin" )
229
- } else {
230
- sysroot. join ( "lib" )
224
+ let sysroot_target_libdir = {
225
+ let mut libdir = sysroot. clone ( ) ;
226
+ libdir. push ( "lib" ) ;
227
+ libdir. push ( "rustlib" ) ;
228
+ libdir. push ( match & kind {
229
+ CompileKind :: Host => rustc. host . as_str ( ) ,
230
+ CompileKind :: Target ( target) => target. short_name ( ) ,
231
+ } ) ;
232
+ libdir. push ( "lib" ) ;
233
+ libdir
231
234
} ;
232
- let mut sysroot_target_libdir = sysroot. clone ( ) ;
233
- sysroot_target_libdir. push ( "lib" ) ;
234
- sysroot_target_libdir. push ( "rustlib" ) ;
235
- sysroot_target_libdir. push ( match & kind {
236
- CompileKind :: Host => rustc. host . as_str ( ) ,
237
- CompileKind :: Target ( target) => target. short_name ( ) ,
238
- } ) ;
239
- sysroot_target_libdir. push ( "lib" ) ;
240
235
241
236
let support_split_debuginfo = {
242
237
// HACK: abuse `--print=crate-name` to use `___` as a delimiter.
@@ -303,7 +298,6 @@ impl TargetInfo {
303
298
crate_type_process,
304
299
crate_types : RefCell :: new ( map) ,
305
300
sysroot,
306
- sysroot_host_libdir,
307
301
sysroot_target_libdir,
308
302
rustflags,
309
303
rustdocflags : extra_args (
0 commit comments