@@ -23,8 +23,8 @@ use crate::core::config::TargetSelection;
2323use crate :: core:: config:: flags:: { Subcommand , get_completion} ;
2424use crate :: utils:: exec:: { BootstrapCommand , command} ;
2525use crate :: utils:: helpers:: {
26- self , LldThreads , add_link_lib_path , add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var,
27- linker_args , linker_flags, t, target_supports_cranelift_backend, up_to_date,
26+ self , LldThreads , add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var, linker_args ,
27+ linker_flags, t, target_supports_cranelift_backend, up_to_date,
2828} ;
2929use crate :: utils:: render_tests:: { add_flags_and_try_run_tests, try_run_tests} ;
3030use crate :: { CLang , DocTests , GitRepo , Mode , envify} ;
@@ -2006,11 +2006,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20062006 // Tests that use compiler libraries may inherit the `-lLLVM` link
20072007 // requirement, but the `-L` library path is not propagated across
20082008 // separate compilations. We can add LLVM's library path to the
2009- // platform-specific environment variable as a workaround.
2009+ // rustc args as a workaround.
20102010 if !builder. config . dry_run ( ) && suite. ends_with ( "fulldeps" ) {
20112011 let llvm_libdir =
20122012 command ( & llvm_config) . arg ( "--libdir" ) . run_capture_stdout ( builder) . stdout ( ) ;
2013- add_link_lib_path ( vec ! [ llvm_libdir . trim ( ) . into ( ) ] , & mut cmd ) ;
2013+ cmd . env ( "RUSTFLAGS" , format ! ( "-Clink-arg=-L{llvm_libdir}" ) ) ;
20142014 }
20152015
20162016 if !builder. config . dry_run ( ) && matches ! ( mode, "run-make" | "coverage-run" ) {
0 commit comments