@@ -85,7 +85,7 @@ use syntax::parse::token::{special_idents};
8585use syntax:: print:: pprust:: stmt_to_str;
8686use syntax:: { ast, ast_util, codemap, ast_map} ;
8787use syntax:: attr:: AttrMetaMethods ;
88- use syntax:: abi:: { X86 , X86_64 , Arm , Mips , Rust , RustIntrinsic , OsWin32 , OsAndroid } ;
88+ use syntax:: abi:: { X86 , X86_64 , Arm , Mips , Rust , RustIntrinsic , OsWin32 } ;
8989use syntax:: visit;
9090use syntax:: visit:: Visitor ;
9191
@@ -2268,11 +2268,7 @@ fn finish_register_fn(ccx: @mut CrateContext, sp: Span, sym: ~str, node_id: ast:
22682268 lib:: llvm:: SetLinkage ( llfn, lib:: llvm:: InternalLinkage ) ;
22692269 }
22702270
2271- // FIXME #4404 android JNI hacks
2272- let is_entry = is_entry_fn ( & ccx. sess , node_id) && ( !* ccx. sess . building_library ||
2273- ( * ccx. sess . building_library &&
2274- ccx. sess . targ_cfg . os == OsAndroid ) ) ;
2275- if is_entry {
2271+ if is_entry_fn ( & ccx. sess , node_id) && !* ccx. sess . building_library {
22762272 create_entry_wrapper ( ccx, sp, llfn) ;
22772273 }
22782274}
@@ -2340,13 +2336,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
23402336 let llfty = Type :: func ( [ ccx. int_type , Type :: i8 ( ) . ptr_to ( ) . ptr_to ( ) ] ,
23412337 & ccx. int_type ) ;
23422338
2343- // FIXME #4404 android JNI hacks
2344- let main_name = if * ccx. sess . building_library {
2345- "amain"
2346- } else {
2347- "main"
2348- } ;
2349- let llfn = decl_cdecl_fn ( ccx. llmod , main_name, llfty) ;
2339+ let llfn = decl_cdecl_fn ( ccx. llmod , "main" , llfty) ;
23502340 let llbb = "top" . with_c_str ( |buf| {
23512341 unsafe {
23522342 llvm:: LLVMAppendBasicBlockInContext ( ccx. llcx , llfn, buf)
@@ -3178,14 +3168,13 @@ pub fn trans_crate(sess: session::Session,
31783168 } ) . to_owned_vec ( ) ;
31793169
31803170 // Make sure that some other crucial symbols are not eliminated from the
3181- // module. This includes the main function (main/amain elsewhere) , the crate
3182- // map (used for debug log settings and I/O), and finally the curious
3183- // rust_stack_exhausted symbol. This symbol is required for use by the
3184- // libmorestack library that we link in, so we must ensure that this symbol
3185- // is not internalized (if defined in the crate).
3171+ // module. This includes the main function, the crate map (used for debug
3172+ // log settings and I/O), and finally the curious rust_stack_exhausted
3173+ // symbol. This symbol is required for use by the libmorestack library that
3174+ // we link in, so we must ensure that this symbol is not internalized (if
3175+ // defined in the crate).
31863176 reachable. push ( ccx. crate_map_name . to_owned ( ) ) ;
31873177 reachable. push ( ~"main") ;
3188- reachable. push ( ~"amain") ;
31893178 reachable. push ( ~"rust_stack_exhausted") ;
31903179
31913180 return CrateTranslation {
0 commit comments