File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,17 @@ fn main() {
145
145
println ! ( "cargo:rustc-link-lib={}={}" , kind, & stem[ 3 ..] ) ;
146
146
return ;
147
147
}
148
-
149
- let compiler = cc:: Build :: new ( ) . get_compiler ( ) ;
148
+ // Disable -Wextra warnings - jemalloc doesn't compile free of warnings with
149
+ // it enabled: https://github.com/jemalloc/jemalloc/issues/1196
150
+ let compiler = cc:: Build :: new ( ) . extra_warnings ( false ) . get_compiler ( ) ;
151
+ let cflags = compiler
152
+ . args ( )
153
+ . iter ( )
154
+ . map ( |s| s. to_str ( ) . unwrap ( ) )
155
+ . collect :: < Vec < _ > > ( )
156
+ . join ( " " ) ;
150
157
info ! ( "CC={:?}" , compiler. path( ) ) ;
158
+ info ! ( "CFLAGS={:?}" , cflags) ;
151
159
152
160
assert ! ( out_dir. exists( ) , "OUT_DIR does not exist" ) ;
153
161
let jemalloc_repo_dir = PathBuf :: from ( "jemalloc" ) ;
@@ -182,6 +190,9 @@ fn main() {
182
190
)
183
191
. current_dir ( & build_dir)
184
192
. env ( "CC" , compiler. path ( ) )
193
+ . env ( "CFLAGS" , cflags. clone ( ) )
194
+ . env ( "LDFLAGS" , cflags. clone ( ) )
195
+ . env ( "CPPFLAGS" , cflags)
185
196
. arg ( format ! ( "--with-version={je_version}" ) )
186
197
. arg ( "--disable-cxx" )
187
198
. arg ( "--enable-doc=no" )
You can’t perform that action at this time.
0 commit comments