@@ -81,6 +81,7 @@ pub struct Config {
8181 // rust codegen options
8282 pub rust_optimize : bool ,
8383 pub rust_codegen_units : Option < u32 > ,
84+ pub rust_thinlto : bool ,
8485 pub rust_debug_assertions : bool ,
8586 pub rust_debuginfo : bool ,
8687 pub rust_debuginfo_lines : bool ,
@@ -261,6 +262,7 @@ impl Default for StringOrBool {
261262struct Rust {
262263 optimize : Option < bool > ,
263264 codegen_units : Option < u32 > ,
265+ thinlto : Option < bool > ,
264266 debug_assertions : Option < bool > ,
265267 debuginfo : Option < bool > ,
266268 debuginfo_lines : Option < bool > ,
@@ -412,6 +414,7 @@ impl Config {
412414
413415 // Store off these values as options because if they're not provided
414416 // we'll infer default values for them later
417+ let mut thinlto = None ;
415418 let mut llvm_assertions = None ;
416419 let mut debuginfo_lines = None ;
417420 let mut debuginfo_only_std = None ;
@@ -455,6 +458,7 @@ impl Config {
455458 optimize = rust. optimize ;
456459 ignore_git = rust. ignore_git ;
457460 debug_jemalloc = rust. debug_jemalloc ;
461+ thinlto = rust. thinlto ;
458462 set ( & mut config. rust_optimize_tests , rust. optimize_tests ) ;
459463 set ( & mut config. rust_debuginfo_tests , rust. debuginfo_tests ) ;
460464 set ( & mut config. codegen_tests , rust. codegen_tests ) ;
@@ -539,6 +543,7 @@ impl Config {
539543 "stable" | "beta" | "nightly" => true ,
540544 _ => false ,
541545 } ;
546+ config. rust_thinlto = thinlto. unwrap_or ( true ) ;
542547 config. rust_debuginfo_lines = debuginfo_lines. unwrap_or ( default) ;
543548 config. rust_debuginfo_only_std = debuginfo_only_std. unwrap_or ( default) ;
544549
0 commit comments