File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 44import  subprocess 
55import  sys 
66
7- # TODO: LooseVersion is undocumented; use something else. 
8- from  distutils .version  import  LooseVersion 
9- 
107import  lit .formats 
118import  lit .util 
129
@@ -279,7 +276,11 @@ def get_clang_default_dwarf_version_string(triple):
279276gdb_version_string  =  get_gdb_version_string ()
280277if  dwarf_version_string  and  gdb_version_string :
281278    if  int (dwarf_version_string ) >=  5 :
282-         if  LooseVersion (gdb_version_string ) <  LooseVersion ("10.1" ):
279+         try :
280+             from  packaging  import  version 
281+         except :
282+             lit_config .fatal ("Running gdb tests requires the packaging package" )
283+         if  version .parse (gdb_version_string ) <  version .parse ("10.1" ):
283284            # Example for llgdb-tests, which use lldb on darwin but gdb elsewhere: 
284285            # XFAIL: !system-darwin && gdb-clang-incompatibility 
285286            config .available_features .add ("gdb-clang-incompatibility" )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments