File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ impl Library {
46
46
47
47
/// Seek MKL libraries in the given directory.
48
48
///
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*`
51
52
///
52
53
pub fn seek_directory ( config : Config , root_dir : impl AsRef < Path > ) -> Option < Self > {
53
54
let mut library_dir = None ;
@@ -65,7 +66,21 @@ impl Library {
65
66
) ,
66
67
_ => continue ,
67
68
} ;
68
- let dir = path. parent ( ) . unwrap ( ) . to_owned ( ) ;
69
+ let dir = path
70
+ . parent ( )
71
+ . expect ( "parent must exist here since this is under `root_dir`" )
72
+ . to_owned ( ) ;
73
+ // Skip directory for ia32
74
+ for c in dir. components ( ) {
75
+ if let std:: path:: Component :: Normal ( c) = c {
76
+ if c. to_str ( )
77
+ . expect ( "Non-UTF8 directory name" )
78
+ . starts_with ( "ia32" )
79
+ {
80
+ continue ;
81
+ }
82
+ }
83
+ }
69
84
if stem == "mkl" && ext == "h" {
70
85
include_dir = Some ( dir) ;
71
86
continue ;
You can’t perform that action at this time.
0 commit comments