File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use std::path::PathBuf;
23
23
fn main ( ) {
24
24
let args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
25
25
let rustdoc = env:: var_os ( "RUSTDOC_REAL" ) . expect ( "RUSTDOC_REAL was not set" ) ;
26
- let libdir = env:: var_os ( "RUSTC_LIBDIR " ) . expect ( "RUSTC_LIBDIR was not set" ) ;
26
+ let libdir = env:: var_os ( "RUSTDOC_LIBDIR " ) . expect ( "RUSTDOC_LIBDIR was not set" ) ;
27
27
let stage = env:: var ( "RUSTC_STAGE" ) . expect ( "RUSTC_STAGE was not set" ) ;
28
28
let sysroot = env:: var_os ( "RUSTC_SYSROOT" ) . expect ( "RUSTC_SYSROOT was not set" ) ;
29
29
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ impl<'a> Builder<'a> {
416
416
let compiler = self . compiler ( self . top_stage , host) ;
417
417
cmd. env ( "RUSTC_STAGE" , compiler. stage . to_string ( ) )
418
418
. env ( "RUSTC_SYSROOT" , self . sysroot ( compiler) )
419
- . env ( "RUSTC_LIBDIR " , self . sysroot_libdir ( compiler, self . build . build ) )
419
+ . env ( "RUSTDOC_LIBDIR " , self . sysroot_libdir ( compiler, self . build . build ) )
420
420
. env ( "CFG_RELEASE_CHANNEL" , & self . build . config . channel )
421
421
. env ( "RUSTDOC_REAL" , self . rustdoc ( host) )
422
422
. env ( "RUSTDOC_CRATE_VERSION" , self . build . rust_version ( ) )
@@ -496,6 +496,9 @@ impl<'a> Builder<'a> {
496
496
if let Some ( target_linker) = self . build . linker ( target) {
497
497
cargo. env ( "RUSTC_TARGET_LINKER" , target_linker) ;
498
498
}
499
+ if cmd != "build" {
500
+ cargo. env ( "RUSTDOC_LIBDIR" , self . rustc_libdir ( self . compiler ( 2 , self . build . build ) ) ) ;
501
+ }
499
502
500
503
if mode != Mode :: Tool {
501
504
// Tools don't get debuginfo right now, e.g. cargo and rls don't
You can’t perform that action at this time.
0 commit comments