File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,11 @@ impl Config {
186
186
} ;
187
187
libs. push ( "mkl_core" . into ( ) ) ;
188
188
if matches ! ( self . parallel, Threading :: OpenMP ) {
189
- libs. push ( "iomp5" . into ( ) ) ;
189
+ if cfg ! ( target_os = "windows" ) {
190
+ libs. push ( "iomp5md" . into ( ) ) ;
191
+ } else {
192
+ libs. push ( "iomp5" . into ( ) ) ;
193
+ }
190
194
}
191
195
libs
192
196
}
Original file line number Diff line number Diff line change @@ -7,6 +7,31 @@ use std::{
7
7
process:: Command ,
8
8
} ;
9
9
10
+ /// Filename convention for MKL libraries.
11
+ ///
12
+ /// Be sure that OpenMP runtime does not follow this rule.
13
+ pub fn as_filename ( link : LinkType , name : & str ) -> String {
14
+ if cfg ! ( target_os = "windows" ) {
15
+ match link {
16
+ LinkType :: Static => {
17
+ format ! ( "{}.lib" , name)
18
+ } ,
19
+ LinkType :: Dynamic => {
20
+ format ! ( "{}_dll.lib" , name)
21
+ }
22
+ }
23
+ } else {
24
+ match link {
25
+ LinkType :: Static => {
26
+ format ! ( "lib{}.a" , name)
27
+ } ,
28
+ LinkType :: Dynamic => {
29
+ format ! ( "lib{}.{}" , name, std:: env:: consts:: DLL_PREFIX )
30
+ }
31
+ }
32
+ }
33
+ }
34
+
10
35
/// Lacked definition of [std::env::consts]
11
36
pub const STATIC_EXTENSION : & str = if cfg ! ( any( target_os = "linux" , target_os = "macos" ) ) {
12
37
"a"
You can’t perform that action at this time.
0 commit comments