File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -237,21 +237,26 @@ impl Config {
237
237
getenv_unwrap ( "HOST" )
238
238
} ) ;
239
239
let msvc = target. contains ( "msvc" ) ;
240
- let c_compiler = gcc:: Config :: new ( ) . cargo_metadata ( false )
241
- . opt_level ( 0 )
242
- . debug ( false )
243
- . target ( & target)
244
- . host ( & host)
245
- . static_crt ( self . static_crt . unwrap_or ( false ) )
246
- . get_compiler ( ) ;
247
- let cxx_compiler = gcc:: Config :: new ( ) . cargo_metadata ( false )
248
- . cpp ( true )
249
- . opt_level ( 0 )
250
- . debug ( false )
251
- . target ( & target)
252
- . host ( & host)
253
- . static_crt ( self . static_crt . unwrap_or ( false ) )
254
- . get_compiler ( ) ;
240
+ let mut c_cfg = gcc:: Config :: new ( ) ;
241
+ c_cfg. cargo_metadata ( false )
242
+ . opt_level ( 0 )
243
+ . debug ( false )
244
+ . target ( & target)
245
+ . host ( & host) ;
246
+ let mut cxx_cfg = gcc:: Config :: new ( ) ;
247
+ cxx_cfg. cargo_metadata ( false )
248
+ . cpp ( true )
249
+ . opt_level ( 0 )
250
+ . debug ( false )
251
+ . target ( & target)
252
+ . host ( & host) ;
253
+ if let Some ( static_crt) = self . static_crt {
254
+ c_cfg. static_crt ( static_crt) ;
255
+ cxx_cfg. static_crt ( static_crt) ;
256
+ }
257
+
258
+ let c_compiler = gcc:: Config :: new ( ) . get_compiler ( ) ;
259
+ let cxx_compiler = gcc:: Config :: new ( ) . get_compiler ( ) ;
255
260
256
261
let dst = self . out_dir . clone ( ) . unwrap_or_else ( || {
257
262
PathBuf :: from ( getenv_unwrap ( "OUT_DIR" ) )
You can’t perform that action at this time.
0 commit comments