File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 21
21
// SOFTWARE.
22
22
23
23
use std:: env;
24
+ use std:: path;
25
+ use std:: process:: Command ;
24
26
25
27
fn main ( ) {
26
- let dir = env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ;
28
+ let mkl_dir = path:: Path :: new ( & env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) . join ( "mkl_lib" ) ;
29
+ let st = Command :: new ( "tar" )
30
+ . args ( & [ "Jxvf" , "mkl.tar.xz" ] )
31
+ . current_dir ( & mkl_dir)
32
+ . status ( )
33
+ . expect ( "Failed to start decompression (maybe 'tar' is missing?)" ) ;
34
+ if !st. success ( ) {
35
+ panic ! ( "Failed to extract MKL libraries" ) ;
36
+ }
37
+
27
38
println ! ( "cargo:rustc-link-lib=static=mkl_intel_ilp64" ) ;
28
- println ! ( "cargo:rustc-link-lib=static=gomp" ) ;
29
- println ! ( "cargo:rustc-link-search=native={}/mkl_lib" , dir) ;
39
+ println ! ( "cargo:rustc-link-lib=static=mkl_intel_thread" ) ;
40
+ println ! ( "cargo:rustc-link-lib=static=iomp5" ) ;
41
+ println ! ( "cargo:rustc-link-search=native={}" , mkl_dir. display( ) ) ;
30
42
}
Original file line number Diff line number Diff line change
1
+ # expanded libraries
2
+ * .a
You can’t perform that action at this time.
0 commit comments