File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,15 @@ impl<'a> Builder<'a> {
709709 return ;
710710 }
711711
712- add_dylib_path ( vec ! [ self . rustc_libdir( compiler) ] , cmd) ;
712+ let mut dylib_dirs = vec ! [ self . rustc_libdir( compiler) ] ;
713+
714+ // Ensure that the downloaded LLVM libraries can be found.
715+ if self . config . llvm_from_ci {
716+ let ci_llvm_lib = self . out . join ( & * compiler. host . triple ) . join ( "ci-llvm" ) . join ( "lib" ) ;
717+ dylib_dirs. push ( ci_llvm_lib) ;
718+ }
719+
720+ add_dylib_path ( dylib_dirs, cmd) ;
713721 }
714722
715723 /// Gets a path to the compiler specified.
Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ impl Step for Miri {
449449 SourceType :: Submodule ,
450450 & [ ] ,
451451 ) ;
452+ cargo. add_rustc_lib_path ( builder, compiler) ;
452453 cargo. arg ( "--" ) . arg ( "miri" ) . arg ( "setup" ) ;
453454
454455 // Tell `cargo miri setup` where to find the sources.
@@ -500,6 +501,7 @@ impl Step for Miri {
500501 SourceType :: Submodule ,
501502 & [ ] ,
502503 ) ;
504+ cargo. add_rustc_lib_path ( builder, compiler) ;
503505
504506 // miri tests need to know about the stage sysroot
505507 cargo. env ( "MIRI_SYSROOT" , miri_sysroot) ;
@@ -508,8 +510,6 @@ impl Step for Miri {
508510
509511 cargo. arg ( "--" ) . args ( builder. config . cmd . test_args ( ) ) ;
510512
511- cargo. add_rustc_lib_path ( builder, compiler) ;
512-
513513 let mut cargo = Command :: from ( cargo) ;
514514 if !try_run ( builder, & mut cargo) {
515515 return ;
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ pub fn libdir(target: TargetSelection) -> &'static str {
4545}
4646
4747/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
48+ /// If The dylib_path_par is already set for this cmd, the old value will be overwritten!
4849pub fn add_dylib_path ( path : Vec < PathBuf > , cmd : & mut Command ) {
4950 let mut list = dylib_path ( ) ;
5051 for path in path {
You can’t perform that action at this time.
0 commit comments