@@ -35,12 +35,8 @@ fn main() {
35
35
// that the feature set used by std is the same across all
36
36
// targets, which means we have to build the alloc_jemalloc crate
37
37
// for targets like emscripten, even if we don't use it.
38
- if target. contains ( "rumprun" ) ||
39
- target. contains ( "bitrig" ) ||
40
- target. contains ( "openbsd" ) ||
41
- target. contains ( "msvc" ) ||
42
- target. contains ( "emscripten" )
43
- {
38
+ if target. contains ( "rumprun" ) || target. contains ( "bitrig" ) || target. contains ( "openbsd" ) ||
39
+ target. contains ( "msvc" ) || target. contains ( "emscripten" ) {
44
40
println ! ( "cargo:rustc-cfg=dummy_jemalloc" ) ;
45
41
return ;
46
42
}
@@ -64,16 +60,16 @@ fn main() {
64
60
// only msvc returns None for ar so unwrap is okay
65
61
let ar = build_helper:: cc2ar ( compiler. path ( ) , & target) . unwrap ( ) ;
66
62
let cflags = compiler. args ( )
67
- . iter ( )
68
- . map ( |s| s. to_str ( ) . unwrap ( ) )
69
- . collect :: < Vec < _ > > ( )
70
- . join ( " " ) ;
63
+ . iter ( )
64
+ . map ( |s| s. to_str ( ) . unwrap ( ) )
65
+ . collect :: < Vec < _ > > ( )
66
+ . join ( " " ) ;
71
67
72
68
let mut stack = src_dir. join ( "../jemalloc" )
73
- . read_dir ( )
74
- . unwrap ( )
75
- . map ( |e| e. unwrap ( ) )
76
- . collect :: < Vec < _ > > ( ) ;
69
+ . read_dir ( )
70
+ . unwrap ( )
71
+ . map ( |e| e. unwrap ( ) )
72
+ . collect :: < Vec < _ > > ( ) ;
77
73
while let Some ( entry) = stack. pop ( ) {
78
74
let path = entry. path ( ) ;
79
75
if entry. file_type ( ) . unwrap ( ) . is_dir ( ) {
@@ -155,10 +151,10 @@ fn main() {
155
151
156
152
run ( & mut cmd) ;
157
153
run ( Command :: new ( "make" )
158
- . current_dir ( & build_dir)
159
- . arg ( "build_lib_static" )
160
- . arg ( "-j" )
161
- . arg ( env:: var ( "NUM_JOBS" ) . expect ( "NUM_JOBS was not set" ) ) ) ;
154
+ . current_dir ( & build_dir)
155
+ . arg ( "build_lib_static" )
156
+ . arg ( "-j" )
157
+ . arg ( env:: var ( "NUM_JOBS" ) . expect ( "NUM_JOBS was not set" ) ) ) ;
162
158
163
159
if target. contains ( "windows" ) {
164
160
println ! ( "cargo:rustc-link-lib=static=jemalloc" ) ;
0 commit comments