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 {
203203            Self :: Llvm  => "llvm" , 
204204        } 
205205    } 
206+ 
207+     pub  fn  is_llvm ( self )  -> bool  { 
208+         matches ! ( self ,  Self :: Llvm ) 
209+     } 
206210} 
207211
208212/// Configuration for `compiletest` *per invocation*. 
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ pub(super) fn handle_needs(
8181        } , 
8282        Need  { 
8383            name :  "needs-enzyme" , 
84-             condition :  config. has_enzyme , 
84+             condition :  config. has_enzyme  && config . default_codegen_backend . is_llvm ( ) , 
8585            ignore_reason :  "ignored when LLVM Enzyme is disabled" , 
8686        } , 
8787        Need  { 
@@ -161,7 +161,7 @@ pub(super) fn handle_needs(
161161        } , 
162162        Need  { 
163163            name :  "needs-llvm-zstd" , 
164-             condition :  cache. llvm_zstd , 
164+             condition :  cache. llvm_zstd  && config . default_codegen_backend . is_llvm ( ) , 
165165            ignore_reason :  "ignored if LLVM wasn't build with zstd for ELF section compression" , 
166166        } , 
167167        Need  { 
@@ -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 ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments