@@ -81,6 +81,7 @@ pub struct Config {
81
81
// rust codegen options
82
82
pub rust_optimize : bool ,
83
83
pub rust_codegen_units : Option < u32 > ,
84
+ pub rust_thinlto : bool ,
84
85
pub rust_debug_assertions : bool ,
85
86
pub rust_debuginfo : bool ,
86
87
pub rust_debuginfo_lines : bool ,
@@ -261,6 +262,7 @@ impl Default for StringOrBool {
261
262
struct Rust {
262
263
optimize : Option < bool > ,
263
264
codegen_units : Option < u32 > ,
265
+ thinlto : Option < bool > ,
264
266
debug_assertions : Option < bool > ,
265
267
debuginfo : Option < bool > ,
266
268
debuginfo_lines : Option < bool > ,
@@ -412,6 +414,7 @@ impl Config {
412
414
413
415
// Store off these values as options because if they're not provided
414
416
// we'll infer default values for them later
417
+ let mut thinlto = None ;
415
418
let mut llvm_assertions = None ;
416
419
let mut debuginfo_lines = None ;
417
420
let mut debuginfo_only_std = None ;
@@ -455,6 +458,7 @@ impl Config {
455
458
optimize = rust. optimize ;
456
459
ignore_git = rust. ignore_git ;
457
460
debug_jemalloc = rust. debug_jemalloc ;
461
+ thinlto = rust. thinlto ;
458
462
set ( & mut config. rust_optimize_tests , rust. optimize_tests ) ;
459
463
set ( & mut config. rust_debuginfo_tests , rust. debuginfo_tests ) ;
460
464
set ( & mut config. codegen_tests , rust. codegen_tests ) ;
@@ -539,6 +543,7 @@ impl Config {
539
543
"stable" | "beta" | "nightly" => true ,
540
544
_ => false ,
541
545
} ;
546
+ config. rust_thinlto = thinlto. unwrap_or ( true ) ;
542
547
config. rust_debuginfo_lines = debuginfo_lines. unwrap_or ( default) ;
543
548
config. rust_debuginfo_only_std = debuginfo_only_std. unwrap_or ( default) ;
544
549
0 commit comments