@@ -99,10 +99,12 @@ pub struct Config {
9999 pub rustc_parallel_queries : bool ,
100100 pub rustc_default_linker : Option < String > ,
101101 pub rust_optimize_tests : bool ,
102+ pub rust_polly_tests : bool ,
102103 pub rust_debuginfo_tests : bool ,
103104 pub rust_dist_src : bool ,
104105 pub rust_codegen_backends : Vec < Interned < String > > ,
105106 pub rust_codegen_backends_dir : String ,
107+ pub rust_polly_self : bool ,
106108
107109 pub build : Interned < String > ,
108110 pub hosts : Vec < Interned < String > > ,
@@ -294,6 +296,7 @@ struct Rust {
294296 rpath : Option < bool > ,
295297 optimize_tests : Option < bool > ,
296298 debuginfo_tests : Option < bool > ,
299+ polly_tests : Option < bool > ,
297300 codegen_tests : Option < bool > ,
298301 ignore_git : Option < bool > ,
299302 debug : Option < bool > ,
@@ -306,6 +309,7 @@ struct Rust {
306309 wasm_syscall : Option < bool > ,
307310 lld : Option < bool > ,
308311 deny_warnings : Option < bool > ,
312+ polly_self : Option < bool > ,
309313}
310314
311315/// TOML representation of how each build target is configured.
@@ -515,6 +519,10 @@ impl Config {
515519 ignore_git = rust. ignore_git ;
516520 debug_jemalloc = rust. debug_jemalloc ;
517521 set ( & mut config. rust_optimize_tests , rust. optimize_tests ) ;
522+ set ( & mut config. rust_polly_tests , rust. polly_tests ) ;
523+ if !config. rust_optimize_tests {
524+ config. rust_polly_tests = false ;
525+ }
518526 set ( & mut config. rust_debuginfo_tests , rust. debuginfo_tests ) ;
519527 set ( & mut config. codegen_tests , rust. codegen_tests ) ;
520528 set ( & mut config. rust_rpath , rust. rpath ) ;
@@ -545,6 +553,10 @@ impl Config {
545553 Some ( n) => config. rust_codegen_units = Some ( n) ,
546554 None => { }
547555 }
556+
557+ config. rust_polly_self = rust
558+ . polly_self
559+ . unwrap_or ( false ) ;
548560 }
549561
550562 if let Some ( ref t) = toml. target {
@@ -602,6 +614,10 @@ impl Config {
602614 config. rust_debug_assertions = debug_assertions. unwrap_or ( default) ;
603615 config. rust_optimize = optimize. unwrap_or ( !default) ;
604616
617+ if !config. rust_optimize {
618+ config. rust_polly_self = false ;
619+ }
620+
605621 let default = config. channel == "dev" ;
606622 config. ignore_git = ignore_git. unwrap_or ( default) ;
607623
0 commit comments