@@ -16,8 +16,8 @@ pub struct Library {
16
16
library_dir : PathBuf ,
17
17
/// Directory where `libiomp5.a` or `libiomp5.so` exists
18
18
///
19
- /// They are sometimes placed in different position.
20
- /// Returns `None` if they exist on `library_dir `.
19
+ /// They are not required for `mkl-*-*-seq` cases,
20
+ /// and then this is `None `.
21
21
iomp5_dir : Option < PathBuf > ,
22
22
}
23
23
@@ -156,9 +156,6 @@ impl Library {
156
156
if config. parallel == Threading :: OpenMP && iomp5_dir. is_none ( ) {
157
157
return Ok ( None ) ;
158
158
}
159
- if library_dir == iomp5_dir {
160
- iomp5_dir = None ;
161
- }
162
159
Ok ( match ( library_dir, include_dir) {
163
160
( Some ( library_dir) , Some ( include_dir) ) => Some ( Library {
164
161
config,
@@ -253,7 +250,9 @@ impl Library {
253
250
pub fn print_cargo_metadata ( & self ) -> Result < ( ) > {
254
251
println ! ( "cargo:rustc-link-search={}" , self . library_dir. display( ) ) ;
255
252
if let Some ( iomp5_dir) = & self . iomp5_dir {
256
- println ! ( "cargo:rustc-link-search={}" , iomp5_dir. display( ) ) ;
253
+ if iomp5_dir != & self . library_dir {
254
+ println ! ( "cargo:rustc-link-search={}" , iomp5_dir. display( ) ) ;
255
+ }
257
256
}
258
257
for lib in self . config . libs ( ) {
259
258
match self . config . link {
0 commit comments