@@ -84,7 +84,7 @@ use syntax::parse::token::{special_idents};
8484use syntax:: print:: pprust:: stmt_to_str;
8585use syntax:: { ast, ast_util, codemap, ast_map} ;
8686use syntax:: attr:: AttrMetaMethods ;
87- use syntax:: abi:: { X86 , X86_64 , Arm , Mips , Rust , RustIntrinsic , OsWin32 , OsAndroid } ;
87+ use syntax:: abi:: { X86 , X86_64 , Arm , Mips , Rust , RustIntrinsic , OsWin32 } ;
8888use syntax:: visit;
8989use syntax:: visit:: Visitor ;
9090
@@ -2289,11 +2289,7 @@ fn finish_register_fn(ccx: @mut CrateContext, sp: Span, sym: ~str, node_id: ast:
22892289 lib:: llvm:: SetLinkage ( llfn, lib:: llvm:: InternalLinkage ) ;
22902290 }
22912291
2292- // FIXME #4404 android JNI hacks
2293- let is_entry = is_entry_fn ( & ccx. sess , node_id) && ( !* ccx. sess . building_library ||
2294- ( * ccx. sess . building_library &&
2295- ccx. sess . targ_cfg . os == OsAndroid ) ) ;
2296- if is_entry {
2292+ if is_entry_fn ( & ccx. sess , node_id) && !* ccx. sess . building_library {
22972293 create_entry_wrapper ( ccx, sp, llfn) ;
22982294 }
22992295}
@@ -2361,13 +2357,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
23612357 let llfty = Type :: func ( [ ccx. int_type , Type :: i8 ( ) . ptr_to ( ) . ptr_to ( ) ] ,
23622358 & ccx. int_type ) ;
23632359
2364- // FIXME #4404 android JNI hacks
2365- let main_name = if * ccx. sess . building_library {
2366- "amain"
2367- } else {
2368- "main"
2369- } ;
2370- let llfn = decl_cdecl_fn ( ccx. llmod , main_name, llfty) ;
2360+ let llfn = decl_cdecl_fn ( ccx. llmod , "main" , llfty) ;
23712361 let llbb = "top" . with_c_str ( |buf| {
23722362 unsafe {
23732363 llvm:: LLVMAppendBasicBlockInContext ( ccx. llcx , llfn, buf)
@@ -3199,14 +3189,13 @@ pub fn trans_crate(sess: session::Session,
31993189 } ) . to_owned_vec ( ) ;
32003190
32013191 // Make sure that some other crucial symbols are not eliminated from the
3202- // module. This includes the main function (main/amain elsewhere) , the crate
3203- // map (used for debug log settings and I/O), and finally the curious
3204- // rust_stack_exhausted symbol. This symbol is required for use by the
3205- // libmorestack library that we link in, so we must ensure that this symbol
3206- // is not internalized (if defined in the crate).
3192+ // module. This includes the main function, the crate map (used for debug
3193+ // log settings and I/O), and finally the curious rust_stack_exhausted
3194+ // symbol. This symbol is required for use by the libmorestack library that
3195+ // we link in, so we must ensure that this symbol is not internalized (if
3196+ // defined in the crate).
32073197 reachable. push ( ccx. crate_map_name . to_owned ( ) ) ;
32083198 reachable. push ( ~"main") ;
3209- reachable. push ( ~"amain") ;
32103199 reachable. push ( ~"rust_stack_exhausted") ;
32113200
32123201 return CrateTranslation {
0 commit comments