@@ -81,8 +81,8 @@ pub(super) fn handle_needs(
8181 } ,
8282 Need {
8383 name : "needs-enzyme" ,
84- condition : config. has_enzyme ,
85- ignore_reason : "ignored when LLVM Enzyme is disabled" ,
84+ condition : config. has_enzyme && config . default_codegen_backend . is_llvm ( ) ,
85+ ignore_reason : "ignored when LLVM Enzyme is disabled or LLVM is not the default codegen backend " ,
8686 } ,
8787 Need {
8888 name : "needs-run-enabled" ,
@@ -161,8 +161,8 @@ pub(super) fn handle_needs(
161161 } ,
162162 Need {
163163 name : "needs-llvm-zstd" ,
164- condition : cache. llvm_zstd ,
165- ignore_reason : "ignored if LLVM wasn't build with zstd for ELF section compression" ,
164+ condition : cache. llvm_zstd && config . default_codegen_backend . is_llvm ( ) ,
165+ ignore_reason : "ignored if LLVM wasn't build with zstd for ELF section compression or LLVM is not the default codegen backend " ,
166166 } ,
167167 Need {
168168 name : "needs-rustc-debug-assertions" ,
@@ -279,7 +279,10 @@ pub(super) fn handle_needs(
279279
280280 // Handled elsewhere.
281281 if name == "needs-llvm-components" {
282- return IgnoreDecision :: Continue ;
282+ if config. default_codegen_backend . is_llvm ( ) {
283+ return IgnoreDecision :: Continue ;
284+ }
285+ return IgnoreDecision :: Ignore { reason : "LLVM specific test" . into ( ) } ;
283286 }
284287
285288 let mut found_valid = false ;
0 commit comments