@@ -47,8 +47,6 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
4747 Some ( PathBuf :: from ( "ar" ) )
4848 } else if target. contains ( "vxworks" ) {
4949 Some ( PathBuf :: from ( "wr-ar" ) )
50- } else if target. contains ( "android" ) {
51- Some ( cc. parent ( ) . unwrap ( ) . join ( PathBuf :: from ( "llvm-ar" ) ) )
5250 } else {
5351 let parent = cc. parent ( ) . unwrap ( ) ;
5452 let file = cc. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
@@ -221,22 +219,12 @@ fn set_compiler(
221219}
222220
223221pub ( crate ) fn ndk_compiler ( compiler : Language , triple : & str , ndk : & Path ) -> PathBuf {
224- let mut triple_iter = triple. split ( "-" ) ;
225- let triple_translated = if let Some ( arch) = triple_iter. next ( ) {
226- let arch_new = match arch {
227- "arm" | "armv7" | "armv7neon" | "thumbv7" | "thumbv7neon" => "armv7a" ,
228- other => other,
229- } ;
230- std:: iter:: once ( arch_new) . chain ( triple_iter) . collect :: < Vec < & str > > ( ) . join ( "-" )
231- } else {
232- triple. to_string ( )
233- } ;
234-
235- // API 19 is the earliest API level supported by NDK r25b but AArch64 and x86_64 support
236- // begins at API level 21.
237- let api_level =
238- if triple. contains ( "aarch64" ) || triple. contains ( "x86_64" ) { "21" } else { "19" } ;
239- let compiler = format ! ( "{}{}-{}" , triple_translated, api_level, compiler. clang( ) ) ;
222+ let triple_translated = triple
223+ . replace ( "armv7neon" , "arm" )
224+ . replace ( "armv7" , "arm" )
225+ . replace ( "thumbv7neon" , "arm" )
226+ . replace ( "thumbv7" , "arm" ) ;
227+ let compiler = format ! ( "{}-{}" , triple_translated, compiler. clang( ) ) ;
240228 ndk. join ( "bin" ) . join ( compiler)
241229}
242230
0 commit comments