@@ -194,14 +194,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
194194 let target = opt_str2 ( matches. opt_str ( "target" ) ) ;
195195 let android_cross_path = opt_path ( matches, "android-cross-path" ) ;
196196 let ( cdb, cdb_version) = analyze_cdb ( matches. opt_str ( "cdb" ) , & target) ;
197- let ( gdb, gdb_version, gdb_native_rust) =
198- analyze_gdb ( matches. opt_str ( "gdb" ) , & target, & android_cross_path) ;
199- let ( lldb_version, lldb_native_rust) = matches
200- . opt_str ( "lldb-version" )
201- . as_deref ( )
202- . and_then ( extract_lldb_version)
203- . map ( |( v, b) | ( Some ( v) , b) )
204- . unwrap_or ( ( None , false ) ) ;
197+ let ( gdb, gdb_version) = analyze_gdb ( matches. opt_str ( "gdb" ) , & target, & android_cross_path) ;
198+ let lldb_version = matches. opt_str ( "lldb-version" ) . as_deref ( ) . and_then ( extract_lldb_version) ;
205199 let color = match matches. opt_str ( "color" ) . as_deref ( ) {
206200 Some ( "auto" ) | None => ColorConfig :: AutoColor ,
207201 Some ( "always" ) => ColorConfig :: AlwaysColor ,
@@ -298,9 +292,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
298292 cdb_version,
299293 gdb,
300294 gdb_version,
301- gdb_native_rust,
302295 lldb_version,
303- lldb_native_rust,
304296 llvm_version,
305297 system_llvm : matches. opt_present ( "system-llvm" ) ,
306298 android_cross_path,
@@ -1035,19 +1027,17 @@ fn extract_cdb_version(full_version_line: &str) -> Option<[u16; 4]> {
10351027 Some ( [ major, minor, patch, build] )
10361028}
10371029
1038- /// Returns (Path to GDB, GDB Version, GDB has Rust Support )
1030+ /// Returns (Path to GDB, GDB Version)
10391031fn analyze_gdb (
10401032 gdb : Option < String > ,
10411033 target : & str ,
10421034 android_cross_path : & PathBuf ,
1043- ) -> ( Option < String > , Option < u32 > , bool ) {
1035+ ) -> ( Option < String > , Option < u32 > ) {
10441036 #[ cfg( not( windows) ) ]
10451037 const GDB_FALLBACK : & str = "gdb" ;
10461038 #[ cfg( windows) ]
10471039 const GDB_FALLBACK : & str = "gdb.exe" ;
10481040
1049- const MIN_GDB_WITH_RUST : u32 = 7011010 ;
1050-
10511041 let fallback_gdb = || {
10521042 if is_android_gdb_target ( target) {
10531043 let mut gdb_path = match android_cross_path. to_str ( ) {
@@ -1076,12 +1066,10 @@ fn analyze_gdb(
10761066
10771067 let version = match version_line {
10781068 Some ( line) => extract_gdb_version ( & line) ,
1079- None => return ( None , None , false ) ,
1069+ None => return ( None , None ) ,
10801070 } ;
10811071
1082- let gdb_native_rust = version. map_or ( false , |v| v >= MIN_GDB_WITH_RUST ) ;
1083-
1084- ( Some ( gdb) , version, gdb_native_rust)
1072+ ( Some ( gdb) , version)
10851073}
10861074
10871075fn extract_gdb_version ( full_version_line : & str ) -> Option < u32 > {
@@ -1131,8 +1119,8 @@ fn extract_gdb_version(full_version_line: &str) -> Option<u32> {
11311119 Some ( ( ( major * 1000 ) + minor) * 1000 + patch)
11321120}
11331121
1134- /// Returns ( LLDB version, LLDB is rust-enabled)
1135- fn extract_lldb_version ( full_version_line : & str ) -> Option < ( u32 , bool ) > {
1122+ /// Returns LLDB version
1123+ fn extract_lldb_version ( full_version_line : & str ) -> Option < u32 > {
11361124 // Extract the major LLDB version from the given version string.
11371125 // LLDB version strings are different for Apple and non-Apple platforms.
11381126 // The Apple variant looks like this:
@@ -1149,9 +1137,7 @@ fn extract_lldb_version(full_version_line: &str) -> Option<(u32, bool)> {
11491137 // There doesn't seem to be a way to correlate the Apple version
11501138 // with the upstream version, and since the tests were originally
11511139 // written against Apple versions, we make a fake Apple version by
1152- // multiplying the first number by 100. This is a hack, but
1153- // normally fine because the only non-Apple version we test is
1154- // rust-enabled.
1140+ // multiplying the first number by 100. This is a hack.
11551141
11561142 let full_version_line = full_version_line. trim ( ) ;
11571143
@@ -1160,12 +1146,12 @@ fn extract_lldb_version(full_version_line: &str) -> Option<(u32, bool)> {
11601146 {
11611147 if let Some ( idx) = apple_ver. find ( not_a_digit) {
11621148 let version: u32 = apple_ver[ ..idx] . parse ( ) . unwrap ( ) ;
1163- return Some ( ( version, full_version_line . contains ( "rust-enabled" ) ) ) ;
1149+ return Some ( version) ;
11641150 }
11651151 } else if let Some ( lldb_ver) = full_version_line. strip_prefix ( "lldb version " ) {
11661152 if let Some ( idx) = lldb_ver. find ( not_a_digit) {
11671153 let version: u32 = lldb_ver[ ..idx] . parse ( ) . ok ( ) ?;
1168- return Some ( ( version * 100 , full_version_line . contains ( "rust-enabled" ) ) ) ;
1154+ return Some ( version * 100 ) ;
11691155 }
11701156 }
11711157 None
0 commit comments