@@ -84,7 +84,7 @@ use syntax::parse::token::{special_idents};
84
84
use syntax:: print:: pprust:: stmt_to_str;
85
85
use syntax:: { ast, ast_util, codemap, ast_map} ;
86
86
use 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 } ;
88
88
use syntax:: visit;
89
89
use syntax:: visit:: Visitor ;
90
90
@@ -2289,11 +2289,7 @@ fn finish_register_fn(ccx: @mut CrateContext, sp: Span, sym: ~str, node_id: ast:
2289
2289
lib:: llvm:: SetLinkage ( llfn, lib:: llvm:: InternalLinkage ) ;
2290
2290
}
2291
2291
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 {
2297
2293
create_entry_wrapper ( ccx, sp, llfn) ;
2298
2294
}
2299
2295
}
@@ -2361,13 +2357,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
2361
2357
let llfty = Type :: func ( [ ccx. int_type , Type :: i8 ( ) . ptr_to ( ) . ptr_to ( ) ] ,
2362
2358
& ccx. int_type ) ;
2363
2359
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) ;
2371
2361
let llbb = "top" . with_c_str ( |buf| {
2372
2362
unsafe {
2373
2363
llvm:: LLVMAppendBasicBlockInContext ( ccx. llcx , llfn, buf)
@@ -3199,14 +3189,13 @@ pub fn trans_crate(sess: session::Session,
3199
3189
} ) . to_owned_vec ( ) ;
3200
3190
3201
3191
// 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).
3207
3197
reachable. push ( ccx. crate_map_name . to_owned ( ) ) ;
3208
3198
reachable. push ( ~"main") ;
3209
- reachable. push ( ~"amain") ;
3210
3199
reachable. push ( ~"rust_stack_exhausted") ;
3211
3200
3212
3201
return CrateTranslation {
0 commit comments