Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only export #[no_mangle] extern symbols during LTO #35069

Merged
merged 1 commit into from
Jul 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/librustc_metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ use rustc_serialize::Decodable;
use syntax::attr;
use syntax::parse::token;
use syntax::ast;
use syntax::abi::Abi;
use syntax::codemap;
use syntax::print::pprust;
use syntax::ptr::P;
Expand Down Expand Up @@ -1542,13 +1541,9 @@ pub fn is_extern_item<'a, 'tcx>(cdata: Cmd,
let applicable = match item_family(item_doc) {
ImmStatic | MutStatic => true,
Fn => {
let ty::TypeScheme { generics, ty } = get_type(cdata, id, tcx);
let ty::TypeScheme { generics, .. } = get_type(cdata, id, tcx);
let no_generics = generics.types.is_empty();
match ty.sty {
ty::TyFnDef(_, _, fn_ty) | ty::TyFnPtr(fn_ty)
if fn_ty.abi != Abi::Rust => return no_generics,
_ => no_generics,
}
no_generics
},
_ => false,
};
Expand Down