Skip to content

Commit 25f9fa0

Browse files
committed
Merge pull request #4608 from ILyoan/entry_android
export entry point for android
2 parents ce954d1 + 718a0fc commit 25f9fa0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc/middle/resolve.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use core::prelude::*;
1212

13+
use driver::session;
1314
use driver::session::Session;
1415
use metadata::csearch::{each_path, get_method_names_if_trait};
1516
use metadata::csearch::{get_static_methods_if_impl, get_type_name_if_impl};
@@ -3931,7 +3932,10 @@ impl Resolver {
39313932
item_fn(ref fn_decl, _, ref ty_params, ref block) => {
39323933
// If this is the main function, we must record it in the
39333934
// session.
3934-
if !self.session.building_library {
3935+
// FIXME #4404 android JNI hacks
3936+
if !self.session.building_library ||
3937+
self.session.targ_cfg.os == session::os_android {
3938+
39353939
if self.attr_main_fn.is_none() &&
39363940
item.ident == special_idents::main {
39373941

0 commit comments

Comments
 (0)