@@ -117,6 +117,7 @@ struct ConfigBuilder {
117117 profiler_runtime : bool ,
118118 rustc_debug_assertions : bool ,
119119 std_debug_assertions : bool ,
120+ std_remap_debuginfo : bool ,
120121}
121122
122123impl ConfigBuilder {
@@ -185,6 +186,11 @@ impl ConfigBuilder {
185186 self
186187 }
187188
189+ fn std_remap_debuginfo ( & mut self , is_enabled : bool ) -> & mut Self {
190+ self . std_remap_debuginfo = is_enabled;
191+ self
192+ }
193+
188194 fn build ( & mut self ) -> Config {
189195 let args = & [
190196 "compiletest" ,
@@ -246,6 +252,9 @@ impl ConfigBuilder {
246252 if self . std_debug_assertions {
247253 args. push ( "--with-std-debug-assertions" . to_owned ( ) ) ;
248254 }
255+ if self . std_remap_debuginfo {
256+ args. push ( "--with-std-remap-debuginfo" . to_owned ( ) ) ;
257+ }
249258
250259 args. push ( "--rustc-path" . to_string ( ) ) ;
251260 args. push ( std:: env:: var ( "TEST_RUSTC" ) . expect ( "must be configured by bootstrap" ) ) ;
@@ -400,6 +409,19 @@ fn std_debug_assertions() {
400409 assert ! ( check_ignore( & config, "//@ ignore-std-debug-assertions" ) ) ;
401410}
402411
412+ #[ test]
413+ fn std_remap_debuginfo ( ) {
414+ let config: Config = cfg ( ) . std_remap_debuginfo ( false ) . build ( ) ;
415+
416+ assert ! ( check_ignore( & config, "//@ needs-std-remap-debuginfo" ) ) ;
417+ assert ! ( !check_ignore( & config, "//@ ignore-std-remap-debuginfo" ) ) ;
418+
419+ let config: Config = cfg ( ) . std_remap_debuginfo ( true ) . build ( ) ;
420+
421+ assert ! ( !check_ignore( & config, "//@ needs-std-remap-debuginfo" ) ) ;
422+ assert ! ( check_ignore( & config, "//@ ignore-std-remap-debuginfo" ) ) ;
423+ }
424+
403425#[ test]
404426fn stage ( ) {
405427 let config: Config = cfg ( ) . stage ( 1 ) . stage_id ( "stage1-x86_64-unknown-linux-gnu" ) . build ( ) ;
0 commit comments