@@ -194,14 +194,12 @@ pub fn parse_config(args: Vec<String>) -> Config {
194
194
let target = opt_str2 ( matches. opt_str ( "target" ) ) ;
195
195
let android_cross_path = opt_path ( matches, "android-cross-path" ) ;
196
196
let ( cdb, cdb_version) = analyze_cdb ( matches. opt_str ( "cdb" ) , & target) ;
197
- let ( gdb, gdb_version, gdb_native_rust ) =
197
+ let ( gdb, gdb_version) =
198
198
analyze_gdb ( matches. opt_str ( "gdb" ) , & target, & android_cross_path) ;
199
- let ( lldb_version, lldb_native_rust ) = matches
199
+ let lldb_version = matches
200
200
. opt_str ( "lldb-version" )
201
201
. as_deref ( )
202
- . and_then ( extract_lldb_version)
203
- . map ( |( v, b) | ( Some ( v) , b) )
204
- . unwrap_or ( ( None , false ) ) ;
202
+ . and_then ( extract_lldb_version) ;
205
203
let color = match matches. opt_str ( "color" ) . as_deref ( ) {
206
204
Some ( "auto" ) | None => ColorConfig :: AutoColor ,
207
205
Some ( "always" ) => ColorConfig :: AlwaysColor ,
@@ -298,9 +296,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
298
296
cdb_version,
299
297
gdb,
300
298
gdb_version,
301
- gdb_native_rust,
302
299
lldb_version,
303
- lldb_native_rust,
304
300
llvm_version,
305
301
system_llvm : matches. opt_present ( "system-llvm" ) ,
306
302
android_cross_path,
@@ -1035,19 +1031,17 @@ fn extract_cdb_version(full_version_line: &str) -> Option<[u16; 4]> {
1035
1031
Some ( [ major, minor, patch, build] )
1036
1032
}
1037
1033
1038
- /// Returns (Path to GDB, GDB Version, GDB has Rust Support )
1034
+ /// Returns (Path to GDB, GDB Version)
1039
1035
fn analyze_gdb (
1040
1036
gdb : Option < String > ,
1041
1037
target : & str ,
1042
1038
android_cross_path : & PathBuf ,
1043
- ) -> ( Option < String > , Option < u32 > , bool ) {
1039
+ ) -> ( Option < String > , Option < u32 > ) {
1044
1040
#[ cfg( not( windows) ) ]
1045
1041
const GDB_FALLBACK : & str = "gdb" ;
1046
1042
#[ cfg( windows) ]
1047
1043
const GDB_FALLBACK : & str = "gdb.exe" ;
1048
1044
1049
- const MIN_GDB_WITH_RUST : u32 = 7011010 ;
1050
-
1051
1045
let fallback_gdb = || {
1052
1046
if is_android_gdb_target ( target) {
1053
1047
let mut gdb_path = match android_cross_path. to_str ( ) {
@@ -1076,12 +1070,10 @@ fn analyze_gdb(
1076
1070
1077
1071
let version = match version_line {
1078
1072
Some ( line) => extract_gdb_version ( & line) ,
1079
- None => return ( None , None , false ) ,
1073
+ None => return ( None , None ) ,
1080
1074
} ;
1081
1075
1082
- let gdb_native_rust = version. map_or ( false , |v| v >= MIN_GDB_WITH_RUST ) ;
1083
-
1084
- ( Some ( gdb) , version, gdb_native_rust)
1076
+ ( Some ( gdb) , version)
1085
1077
}
1086
1078
1087
1079
fn extract_gdb_version ( full_version_line : & str ) -> Option < u32 > {
@@ -1131,8 +1123,8 @@ fn extract_gdb_version(full_version_line: &str) -> Option<u32> {
1131
1123
Some ( ( ( major * 1000 ) + minor) * 1000 + patch)
1132
1124
}
1133
1125
1134
- /// Returns ( LLDB version, LLDB is rust-enabled)
1135
- fn extract_lldb_version ( full_version_line : & str ) -> Option < ( u32 , bool ) > {
1126
+ /// Returns LLDB version
1127
+ fn extract_lldb_version ( full_version_line : & str ) -> Option < u32 > {
1136
1128
// Extract the major LLDB version from the given version string.
1137
1129
// LLDB version strings are different for Apple and non-Apple platforms.
1138
1130
// The Apple variant looks like this:
@@ -1149,9 +1141,7 @@ fn extract_lldb_version(full_version_line: &str) -> Option<(u32, bool)> {
1149
1141
// There doesn't seem to be a way to correlate the Apple version
1150
1142
// with the upstream version, and since the tests were originally
1151
1143
// 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.
1144
+ // multiplying the first number by 100. This is a hack.
1155
1145
1156
1146
let full_version_line = full_version_line. trim ( ) ;
1157
1147
@@ -1160,12 +1150,12 @@ fn extract_lldb_version(full_version_line: &str) -> Option<(u32, bool)> {
1160
1150
{
1161
1151
if let Some ( idx) = apple_ver. find ( not_a_digit) {
1162
1152
let version: u32 = apple_ver[ ..idx] . parse ( ) . unwrap ( ) ;
1163
- return Some ( ( version, full_version_line . contains ( "rust-enabled" ) ) ) ;
1153
+ return Some ( version) ;
1164
1154
}
1165
1155
} else if let Some ( lldb_ver) = full_version_line. strip_prefix ( "lldb version " ) {
1166
1156
if let Some ( idx) = lldb_ver. find ( not_a_digit) {
1167
1157
let version: u32 = lldb_ver[ ..idx] . parse ( ) . ok ( ) ?;
1168
- return Some ( ( version * 100 , full_version_line . contains ( "rust-enabled" ) ) ) ;
1158
+ return Some ( version * 100 ) ;
1169
1159
}
1170
1160
}
1171
1161
None
0 commit comments