@@ -12,6 +12,7 @@ const S3_ADDR: &'static str = "https://s3-ap-northeast-1.amazonaws.com/rust-inte
12
12
13
13
#[ cfg( target_os = "linux" ) ]
14
14
mod mkl {
15
+ pub const ARCHIVE_NAME : & ' static str = "mkl_linux64" ;
15
16
pub const ARCHIVE : & ' static str = "mkl_linux.tar.xz" ;
16
17
pub const EXT : & ' static str = "so" ;
17
18
pub const PREFIX : & ' static str = "lib" ;
@@ -26,6 +27,7 @@ mod mkl {
26
27
27
28
#[ cfg( target_os = "windows" ) ]
28
29
mod mkl {
30
+ pub const ARCHIVE_NAME : & ' static str = "mkl_windows64" ;
29
31
pub const ARCHIVE : & ' static str = "mkl_windows64.tar.xz" ;
30
32
pub const EXT : & ' static str = "lib" ;
31
33
pub const PREFIX : & ' static str = "" ;
@@ -123,18 +125,8 @@ pub fn package(mkl_path: &Path) -> Fallible<PathBuf> {
123
125
}
124
126
let ( year, update) = get_mkl_version ( & mkl_path. join ( "include/mkl_version.h" ) ) ?;
125
127
info ! ( "Intel MKL version: {}.{}" , year, update) ;
126
- let out = if cfg ! ( target_os = "Linux" ) {
127
- let out = PathBuf :: from ( format ! ( "mkl_linux64_{}_{}.tar.zst" , year, update) ) ;
128
- info ! ( "Create archive for Linux/64bit systems: {}" , out. display( ) ) ;
129
- out
130
- } else {
131
- let out = PathBuf :: from ( format ! ( "mkl_windows64_{}_{}.tar.zst" , year, update) ) ;
132
- info ! (
133
- "Create archive for Windows/64bit systems: {}" ,
134
- out. display( )
135
- ) ;
136
- out
137
- } ;
128
+ let out = PathBuf :: from ( format ! ( "{}_{}_{}.tar.zst" , mkl:: ARCHIVE_NAME , year, update) ) ;
129
+ info ! ( "Create archive: {}" , out. display( ) ) ;
138
130
139
131
let shared_libs: Vec < _ > = glob (
140
132
mkl_path
0 commit comments