File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ impl CodegenBackend {
203
203
Self :: Llvm => "llvm" ,
204
204
}
205
205
}
206
+
207
+ pub fn is_llvm ( self ) -> bool {
208
+ matches ! ( self , Self :: Llvm )
209
+ }
206
210
}
207
211
208
212
/// Configuration for `compiletest` *per invocation*.
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ pub(super) fn handle_needs(
81
81
} ,
82
82
Need {
83
83
name : "needs-enzyme" ,
84
- condition : config. has_enzyme ,
84
+ condition : config. has_enzyme && config . default_codegen_backend . is_llvm ( ) ,
85
85
ignore_reason : "ignored when LLVM Enzyme is disabled" ,
86
86
} ,
87
87
Need {
@@ -161,7 +161,7 @@ pub(super) fn handle_needs(
161
161
} ,
162
162
Need {
163
163
name : "needs-llvm-zstd" ,
164
- condition : cache. llvm_zstd ,
164
+ condition : cache. llvm_zstd && config . default_codegen_backend . is_llvm ( ) ,
165
165
ignore_reason : "ignored if LLVM wasn't build with zstd for ELF section compression" ,
166
166
} ,
167
167
Need {
@@ -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 ;
You can’t perform that action at this time.
0 commit comments