File tree Expand file tree Collapse file tree
run-make-support/src/external_deps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ impl TestCx<'_> {
201201 . env ( "RUSTC" , & self . config . rustc_path )
202202 // Provide which LLVM components are available (e.g. which LLVM components are provided
203203 // through a specific CI runner).
204- . env ( "LLVM_COMPONENTS" , & self . config . llvm_components ) ;
204+ . env ( "LLVM_COMPONENTS" , & self . config . llvm_components )
205+ // In case it's a different codegen backend than LLVM.
206+ . env ( "RUSTC_CODEGEN_BACKEND" , self . config . default_codegen_backend . as_str ( ) ) ;
205207
206208 // The `run-make-cargo` and `build-std` suites need an in-tree `cargo`, `run-make` does not.
207209 if matches ! ( self . config. suite, TestSuite :: RunMakeCargo | TestSuite :: BuildStd ) {
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ pub fn rustc_path() -> String {
7676fn setup_common ( ) -> Command {
7777 let mut cmd = Command :: new ( rustc_path ( ) ) ;
7878 set_host_compiler_dylib_path ( & mut cmd) ;
79+ eprintln ! ( "-----> {:?}" , std:: env:: var( "RUSTC_CODEGEN_BACKEND" ) ) ;
80+ if let Ok ( codegen_backend) = std:: env:: var ( "RUSTC_CODEGEN_BACKEND" ) {
81+ cmd. arg ( format ! ( "-Zcodegen-backend={codegen_backend}" ) ) ;
82+ }
7983 cmd
8084}
8185
You can’t perform that action at this time.
0 commit comments