File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,29 @@ use cmake::Config;
4
4
fn main ( ) {
5
5
let dst = Config :: new ( "c_src/mimalloc" )
6
6
. build ( ) ;
7
+
8
+ dst. push ( "build" ) ;
9
+
7
10
println ! ( "cargo:rustc-link-search=native={}" , dst. display( ) ) ;
8
- //println!("cargo:rustc-link-lib=static=libmimalloc");
11
+ if cfg ! ( debug_assertions) {
12
+ println ! ( "cargo:rustc-link-lib=static=mimalloc-debug" ) ;
13
+ } else {
14
+ println ! ( "cargo:rustc-link-lib=static=mimalloc" ) ;
15
+ }
9
16
}
10
17
11
18
#[ cfg( not( feature = "no_secure" ) ) ]
12
19
fn main ( ) {
13
- let dst = Config :: new ( "c_src/mimalloc" )
20
+ let mut dst = Config :: new ( "c_src/mimalloc" )
14
21
. define ( "SECURE" , "ON" )
15
22
. build ( ) ;
23
+
24
+ dst. push ( "build" ) ;
25
+
16
26
println ! ( "cargo:rustc-link-search=native={}" , dst. display( ) ) ;
17
- //println!("cargo:rustc-link-lib=static=libmimalloc");
27
+ if cfg ! ( debug_assertions) {
28
+ println ! ( "cargo:rustc-link-lib=static=mimalloc-debug" ) ;
29
+ } else {
30
+ println ! ( "cargo:rustc-link-lib=static=mimalloc" ) ;
31
+ }
18
32
}
You can’t perform that action at this time.
0 commit comments