@@ -107,12 +107,14 @@ pub struct Config {
107107 pub rustc_parallel : bool ,
108108 pub rustc_default_linker : Option < String > ,
109109 pub rust_optimize_tests : bool ,
110+ pub rust_polly_tests : bool ,
110111 pub rust_dist_src : bool ,
111112 pub rust_codegen_backends : Vec < Interned < String > > ,
112113 pub rust_verify_llvm_ir : bool ,
113114 pub rust_thin_lto_import_instr_limit : Option < u32 > ,
114115 pub rust_remap_debuginfo : bool ,
115116 pub rust_new_symbol_mangling : bool ,
117+ pub rust_polly_self : bool ,
116118
117119 pub build : TargetSelection ,
118120 pub hosts : Vec < TargetSelection > ,
@@ -394,6 +396,7 @@ struct Rust {
394396 rpath : Option < bool > ,
395397 verbose_tests : Option < bool > ,
396398 optimize_tests : Option < bool > ,
399+ polly_tests : Option < bool > ,
397400 codegen_tests : Option < bool > ,
398401 ignore_git : Option < bool > ,
399402 dist_src : Option < bool > ,
@@ -412,6 +415,7 @@ struct Rust {
412415 llvm_libunwind : Option < bool > ,
413416 control_flow_guard : Option < bool > ,
414417 new_symbol_mangling : Option < bool > ,
418+ polly_self : Option < bool > ,
415419}
416420
417421/// TOML representation of how each build target is configured.
@@ -641,6 +645,10 @@ impl Config {
641645 ignore_git = rust. ignore_git ;
642646 set ( & mut config. rust_new_symbol_mangling , rust. new_symbol_mangling ) ;
643647 set ( & mut config. rust_optimize_tests , rust. optimize_tests ) ;
648+ set ( & mut config. rust_polly_tests , rust. polly_tests ) ;
649+ if !config. rust_optimize_tests {
650+ config. rust_polly_tests = false ;
651+ }
644652 set ( & mut config. codegen_tests , rust. codegen_tests ) ;
645653 set ( & mut config. rust_rpath , rust. rpath ) ;
646654 set ( & mut config. jemalloc , rust. jemalloc ) ;
@@ -675,6 +683,10 @@ impl Config {
675683
676684 config. rust_codegen_units = rust. codegen_units . map ( threads_from_config) ;
677685 config. rust_codegen_units_std = rust. codegen_units_std . map ( threads_from_config) ;
686+
687+ config. rust_polly_self = rust
688+ . polly_self
689+ . unwrap_or ( false ) ;
678690 }
679691
680692 if let Some ( ref t) = toml. target {
@@ -747,6 +759,10 @@ impl Config {
747759 config. rust_debuginfo_level_tools = with_defaults ( debuginfo_level_tools) ;
748760 config. rust_debuginfo_level_tests = debuginfo_level_tests. unwrap_or ( 0 ) ;
749761
762+ if !config. rust_optimize {
763+ config. rust_polly_self = false ;
764+ }
765+
750766 let default = config. channel == "dev" ;
751767 config. ignore_git = ignore_git. unwrap_or ( default) ;
752768
0 commit comments