@@ -85,7 +85,7 @@ use syntax::parse::token::{special_idents};
85
85
use syntax:: print:: pprust:: stmt_to_str;
86
86
use syntax:: { ast, ast_util, codemap, ast_map} ;
87
87
use 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 } ;
89
89
use syntax:: visit;
90
90
use syntax:: visit:: Visitor ;
91
91
@@ -2268,11 +2268,7 @@ fn finish_register_fn(ccx: @mut CrateContext, sp: Span, sym: ~str, node_id: ast:
2268
2268
lib:: llvm:: SetLinkage ( llfn, lib:: llvm:: InternalLinkage ) ;
2269
2269
}
2270
2270
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 {
2276
2272
create_entry_wrapper ( ccx, sp, llfn) ;
2277
2273
}
2278
2274
}
@@ -2340,13 +2336,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
2340
2336
let llfty = Type :: func ( [ ccx. int_type , Type :: i8 ( ) . ptr_to ( ) . ptr_to ( ) ] ,
2341
2337
& ccx. int_type ) ;
2342
2338
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) ;
2350
2340
let llbb = "top" . with_c_str ( |buf| {
2351
2341
unsafe {
2352
2342
llvm:: LLVMAppendBasicBlockInContext ( ccx. llcx , llfn, buf)
@@ -3178,14 +3168,13 @@ pub fn trans_crate(sess: session::Session,
3178
3168
} ) . to_owned_vec ( ) ;
3179
3169
3180
3170
// 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).
3186
3176
reachable. push ( ccx. crate_map_name . to_owned ( ) ) ;
3187
3177
reachable. push ( ~"main") ;
3188
- reachable. push ( ~"amain") ;
3189
3178
reachable. push ( ~"rust_stack_exhausted") ;
3190
3179
3191
3180
return CrateTranslation {
0 commit comments