File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ impl Library {
4646
4747    /// Seek MKL libraries in the given directory. 
4848     /// 
49-      /// This will seek the directory recursively until finding MKL libraries. 
50-      /// This do not follow symbolic links. 
49+      /// - This will seek the directory recursively until finding MKL libraries, 
50+      ///   but do not follow symbolic links. 
51+      /// - This will not seek directory named `ia32*` 
5152     /// 
5253     pub  fn  seek_directory ( config :  Config ,  root_dir :  impl  AsRef < Path > )  -> Option < Self >  { 
5354        let  mut  library_dir = None ; 
@@ -65,7 +66,25 @@ impl Library {
6566                ) , 
6667                _ => continue , 
6768            } ; 
68-             let  dir = path. parent ( ) . unwrap ( ) . to_owned ( ) ; 
69+             // Skip directory for ia32 
70+             if  path. components ( ) . any ( |c| { 
71+                 if  let  std:: path:: Component :: Normal ( c)  = c { 
72+                     if  c. to_str ( ) 
73+                         . expect ( "Non-UTF8 directory name" ) 
74+                         . starts_with ( "ia32" ) 
75+                     { 
76+                         return  true ; 
77+                     } 
78+                 } 
79+                 false 
80+             } )  { 
81+                 continue ; 
82+             } 
83+ 
84+             let  dir = path
85+                 . parent ( ) 
86+                 . expect ( "parent must exist here since this is under `root_dir`" ) 
87+                 . to_owned ( ) ; 
6988            if  stem == "mkl"  && ext == "h"  { 
7089                include_dir = Some ( dir) ; 
7190                continue ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments