@@ -8,7 +8,6 @@ use tracing::debug;
88
99use super :: debugger:: DebuggerCommands ;
1010use super :: { Debugger , Emit , ProcRes , TestCx , Truncated , WillExecute } ;
11- use crate :: common:: Config ;
1211use crate :: debuggers:: { extract_gdb_version, is_android_gdb_target} ;
1312
1413impl TestCx < ' _ > {
@@ -21,18 +20,6 @@ impl TestCx<'_> {
2120 }
2221
2322 fn run_debuginfo_cdb_test ( & self ) {
24- let config = Config {
25- target_rustcflags : self . cleanup_debug_info_options ( & self . config . target_rustcflags ) ,
26- host_rustcflags : self . cleanup_debug_info_options ( & self . config . host_rustcflags ) ,
27- ..self . config . clone ( )
28- } ;
29-
30- let test_cx = TestCx { config : & config, ..* self } ;
31-
32- test_cx. run_debuginfo_cdb_test_no_opt ( ) ;
33- }
34-
35- fn run_debuginfo_cdb_test_no_opt ( & self ) {
3623 let exe_file = self . make_exe_name ( ) ;
3724
3825 // Existing PDB files are update in-place. When changing the debuginfo
@@ -118,18 +105,6 @@ impl TestCx<'_> {
118105 }
119106
120107 fn run_debuginfo_gdb_test ( & self ) {
121- let config = Config {
122- target_rustcflags : self . cleanup_debug_info_options ( & self . config . target_rustcflags ) ,
123- host_rustcflags : self . cleanup_debug_info_options ( & self . config . host_rustcflags ) ,
124- ..self . config . clone ( )
125- } ;
126-
127- let test_cx = TestCx { config : & config, ..* self } ;
128-
129- test_cx. run_debuginfo_gdb_test_no_opt ( ) ;
130- }
131-
132- fn run_debuginfo_gdb_test_no_opt ( & self ) {
133108 let dbg_cmds = DebuggerCommands :: parse_from ( & self . testpaths . file , "gdb" )
134109 . unwrap_or_else ( |e| self . fatal ( & e) ) ;
135110 let mut cmds = dbg_cmds. commands . join ( "\n " ) ;
@@ -355,18 +330,6 @@ impl TestCx<'_> {
355330 self . fatal ( "Can't run LLDB test because LLDB's python path is not set." ) ;
356331 }
357332
358- let config = Config {
359- target_rustcflags : self . cleanup_debug_info_options ( & self . config . target_rustcflags ) ,
360- host_rustcflags : self . cleanup_debug_info_options ( & self . config . host_rustcflags ) ,
361- ..self . config . clone ( )
362- } ;
363-
364- let test_cx = TestCx { config : & config, ..* self } ;
365-
366- test_cx. run_debuginfo_lldb_test_no_opt ( ) ;
367- }
368-
369- fn run_debuginfo_lldb_test_no_opt ( & self ) {
370333 // compile test file (it should have 'compile-flags:-g' in the directive)
371334 let should_run = self . run_if_enabled ( ) ;
372335 let compile_result = self . compile_test ( should_run, Emit :: None ) ;
@@ -501,11 +464,4 @@ impl TestCx<'_> {
501464 . env ( "PYTHONPATH" , pythonpath) ,
502465 )
503466 }
504-
505- fn cleanup_debug_info_options ( & self , options : & Vec < String > ) -> Vec < String > {
506- // Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
507- let options_to_remove = [ "-O" . to_owned ( ) , "-g" . to_owned ( ) , "--debuginfo" . to_owned ( ) ] ;
508-
509- options. iter ( ) . filter ( |x| !options_to_remove. contains ( x) ) . cloned ( ) . collect ( )
510- }
511467}
0 commit comments