File tree 1 file changed +22
-3
lines changed
1 file changed +22
-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,25 @@ impl Library {
65
66
) ,
66
67
_ => continue ,
67
68
} ;
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 ( ) ;
69
88
if stem == "mkl" && ext == "h" {
70
89
include_dir = Some ( dir) ;
71
90
continue ;
You can’t perform that action at this time.
0 commit comments