@@ -3611,24 +3611,23 @@ impl<'test> TestCx<'test> {
3611
3611
// FIXME(jieyouxu): audit these env vars. some of them only makes sense for make, not rustc!
3612
3612
let mut rustc = Command :: new ( & self . config . rustc_path ) ;
3613
3613
rustc
3614
+ // Specify output path
3614
3615
. arg ( "-o" )
3615
3616
. arg ( & recipe_bin)
3617
+ // Specify library search paths for `run_make_support`.
3616
3618
. arg ( format ! ( "-Ldependency={}" , & support_lib_path. parent( ) . unwrap( ) . to_string_lossy( ) ) )
3617
3619
. arg ( format ! ( "-Ldependency={}" , & support_lib_deps. to_string_lossy( ) ) )
3618
3620
. arg ( format ! ( "-Ldependency={}" , & support_lib_deps_deps. to_string_lossy( ) ) )
3621
+ // Provide `run_make_support` as extern prelude, so test writers don't need to write
3622
+ // `extern run_make_support;`.
3619
3623
. arg ( "--extern" )
3620
3624
. arg ( format ! ( "run_make_support={}" , & support_lib_path. to_string_lossy( ) ) )
3625
+ // Default to Edition 2021.
3621
3626
. arg ( "--edition=2021" )
3627
+ // The recipe file itself.
3622
3628
. arg ( & self . testpaths . file . join ( "rmake.rs" ) )
3623
- . env ( "TARGET" , & self . config . target )
3624
- . env ( "PYTHON" , & self . config . python )
3625
- . env ( "RUST_BUILD_STAGE" , & self . config . stage_id )
3626
- . env ( "RUSTC" , & self . config . rustc_path )
3627
- . env ( "LD_LIB_PATH_ENVVAR" , dylib_env_var ( ) )
3628
- . env ( dylib_env_var ( ) , & env:: join_paths ( host_dylib_search_paths) . unwrap ( ) )
3629
- . env ( "HOST_RPATH_DIR" , & self . config . compile_lib_path )
3630
- . env ( "TARGET_RPATH_DIR" , & self . config . run_lib_path )
3631
- . env ( "LLVM_COMPONENTS" , & self . config . llvm_components ) ;
3629
+ // Provide necessary library search paths for rustc.
3630
+ . env ( dylib_env_var ( ) , & env:: join_paths ( host_dylib_search_paths) . unwrap ( ) ) ;
3632
3631
3633
3632
// In test code we want to be very pedantic about values being silently discarded that are
3634
3633
// annotated with `#[must_use]`.
0 commit comments