This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1305,6 +1305,10 @@ impl Step for CodegenBackend {
13051305 return None ;
13061306 }
13071307
1308+ if !builder. config . rust_codegen_backends . contains ( & self . backend ) {
1309+ return None ;
1310+ }
1311+
13081312 if self . backend == "cranelift" {
13091313 if !target_supports_cranelift_backend ( self . compiler . host ) {
13101314 builder. info ( "target not supported by rustc_codegen_cranelift. skipping" ) ;
@@ -1343,12 +1347,15 @@ impl Step for CodegenBackend {
13431347 let backends_dst = PathBuf :: from ( "lib" ) . join ( & backends_rel) ;
13441348
13451349 let backend_name = format ! ( "rustc_codegen_{}" , backend) ;
1350+ let mut found_backend = false ;
13461351 for backend in fs:: read_dir ( & backends_src) . unwrap ( ) {
13471352 let file_name = backend. unwrap ( ) . file_name ( ) ;
13481353 if file_name. to_str ( ) . unwrap ( ) . contains ( & backend_name) {
13491354 tarball. add_file ( backends_src. join ( file_name) , & backends_dst, 0o644 ) ;
1355+ found_backend = true ;
13501356 }
13511357 }
1358+ assert ! ( found_backend) ;
13521359
13531360 Some ( tarball. generate ( ) )
13541361 }
You can’t perform that action at this time.
0 commit comments