File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ fn main() {
3131 // targets, which means we have to build the alloc_jemalloc crate
3232 // for targets like emscripten, even if we don't use it.
3333 let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
34+ let host = env:: var ( "HOST" ) . expect ( "HOST was not set" ) ;
3435 if target. contains ( "rumprun" ) || target. contains ( "bitrig" ) || target. contains ( "openbsd" ) ||
3536 target. contains ( "msvc" ) || target. contains ( "emscripten" ) || target. contains ( "fuchsia" ) ||
3637 target. contains ( "redox" ) {
@@ -68,11 +69,10 @@ fn main() {
6869 } else if !target. contains ( "windows" ) && !target. contains ( "musl" ) {
6970 println ! ( "cargo:rustc-link-lib=pthread" ) ;
7071 }
71- if !cfg ! ( stage0) {
72+ if !cfg ! ( stage0) && target == host {
7273 return
7374 }
7475
75- let host = env:: var ( "HOST" ) . expect ( "HOST was not set" ) ;
7676 let src_dir = env:: current_dir ( ) . unwrap ( ) . join ( "../jemalloc" ) ;
7777 rerun_if_changed_anything_in_dir ( & src_dir) ;
7878 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) {
7171
7272 println ! ( "cargo:rustc-link-lib=static=backtrace" ) ;
7373 println ! ( "cargo:rustc-link-search=native={}/.libs" , build_dir. display( ) ) ;
74- if !cfg ! ( stage0) {
74+ if !cfg ! ( stage0) && target == host {
7575 return
7676 }
7777
You can’t perform that action at this time.
0 commit comments