@@ -81,8 +81,8 @@ pub(super) fn handle_needs(
81
81
} ,
82
82
Need {
83
83
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 " ,
86
86
} ,
87
87
Need {
88
88
name : "needs-run-enabled" ,
@@ -161,8 +161,8 @@ pub(super) fn handle_needs(
161
161
} ,
162
162
Need {
163
163
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 " ,
166
166
} ,
167
167
Need {
168
168
name : "needs-rustc-debug-assertions" ,
@@ -279,7 +279,10 @@ pub(super) fn handle_needs(
279
279
280
280
// Handled elsewhere.
281
281
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 ( ) } ;
283
286
}
284
287
285
288
let mut found_valid = false ;
0 commit comments