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 @@ -203,6 +203,11 @@ impl TestCx<'_> {
203203 // through a specific CI runner).
204204 . env ( "LLVM_COMPONENTS" , & self . config . llvm_components ) ;
205205
206+ if let Some ( codegen_backend) = & self . config . override_codegen_backend {
207+ // In case it's a different codegen backend than LLVM.
208+ cmd. env ( "RUSTC_CODEGEN_BACKEND" , codegen_backend. as_str ( ) ) ;
209+ }
210+
206211 // The `run-make-cargo` and `build-std` suites need an in-tree `cargo`, `run-make` does not.
207212 if matches ! ( self . config. suite, TestSuite :: RunMakeCargo | TestSuite :: BuildStd ) {
208213 cmd. env (
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ 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+ if let Ok ( codegen_backend) = std:: env:: var ( "RUSTC_CODEGEN_BACKEND" ) {
80+ cmd. arg ( format ! ( "-Zcodegen-backend={codegen_backend}" ) ) ;
81+ }
7982 cmd
8083}
8184
You can’t perform that action at this time.
0 commit comments