@@ -69,6 +69,10 @@ fn main() {
69
69
let cflags = compiler. args ( )
70
70
. iter ( )
71
71
. map ( |s| s. to_str ( ) . unwrap ( ) )
72
+ . filter ( |& s| {
73
+ // separate function/data sections trigger errors with android's TLS emulation
74
+ !target. contains ( "android" ) || ( s != "-ffunction-sections" && s != "-fdata-sections" )
75
+ } )
72
76
. collect :: < Vec < _ > > ( )
73
77
. join ( " " ) ;
74
78
@@ -78,6 +82,7 @@ fn main() {
78
82
. unwrap ( )
79
83
. replace ( "C:\\ " , "/c/" )
80
84
. replace ( "\\ " , "/" ) )
85
+ . arg ( "--disable-cxx" )
81
86
. current_dir ( & native. out_dir )
82
87
. env ( "CC" , compiler. path ( ) )
83
88
. env ( "EXTRA_CFLAGS" , cflags. clone ( ) )
@@ -93,9 +98,7 @@ fn main() {
93
98
. env ( "AR" , & ar)
94
99
. env ( "RANLIB" , format ! ( "{} s" , ar. display( ) ) ) ;
95
100
96
- if target. contains ( "ios" ) {
97
- cmd. arg ( "--disable-tls" ) ;
98
- } else if target. contains ( "android" ) {
101
+ if target. contains ( "android" ) {
99
102
// We force android to have prefixed symbols because apparently
100
103
// replacement of the libc allocator doesn't quite work. When this was
101
104
// tested (unprefixed symbols), it was found that the `realpath`
@@ -106,7 +109,6 @@ fn main() {
106
109
// If the test suite passes, however, without symbol prefixes then we
107
110
// should be good to go!
108
111
cmd. arg ( "--with-jemalloc-prefix=je_" ) ;
109
- cmd. arg ( "--disable-tls" ) ;
110
112
} else if target. contains ( "dragonfly" ) || target. contains ( "musl" ) {
111
113
cmd. arg ( "--with-jemalloc-prefix=je_" ) ;
112
114
}
0 commit comments