File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ fn main() {
31
31
// targets, which means we have to build the alloc_jemalloc crate
32
32
// for targets like emscripten, even if we don't use it.
33
33
let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
34
+ let host = env:: var ( "HOST" ) . expect ( "HOST was not set" ) ;
34
35
if target. contains ( "rumprun" ) || target. contains ( "bitrig" ) || target. contains ( "openbsd" ) ||
35
36
target. contains ( "msvc" ) || target. contains ( "emscripten" ) || target. contains ( "fuchsia" ) ||
36
37
target. contains ( "redox" ) {
@@ -68,11 +69,10 @@ fn main() {
68
69
} else if !target. contains ( "windows" ) && !target. contains ( "musl" ) {
69
70
println ! ( "cargo:rustc-link-lib=pthread" ) ;
70
71
}
71
- if !cfg ! ( stage0) {
72
+ if !cfg ! ( stage0) && target == host {
72
73
return
73
74
}
74
75
75
- let host = env:: var ( "HOST" ) . expect ( "HOST was not set" ) ;
76
76
let src_dir = env:: current_dir ( ) . unwrap ( ) . join ( "../jemalloc" ) ;
77
77
rerun_if_changed_anything_in_dir ( & src_dir) ;
78
78
let compiler = gcc:: Config :: new ( ) . get_compiler ( ) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ fn build_libbacktrace(host: &str, target: &str) {
71
71
72
72
println ! ( "cargo:rustc-link-lib=static=backtrace" ) ;
73
73
println ! ( "cargo:rustc-link-search=native={}/.libs" , build_dir. display( ) ) ;
74
- if !cfg ! ( stage0) {
74
+ if !cfg ! ( stage0) && target == host {
75
75
return
76
76
}
77
77
You can’t perform that action at this time.
0 commit comments