Limit symbols exported from proc macros
Only __rustc_proc_macro_decls_*__ and rust_metadata_* need to be exported for proc macros to work. All other symbols only increase binary size and have the potential to conflict with symbols from the host compiler.
This commit is contained in:
@@ -656,9 +656,7 @@ impl<'a> Linker for GccLinker<'a> {
|
||||
return;
|
||||
}
|
||||
|
||||
if crate_type == CrateType::ProcMacro {
|
||||
return;
|
||||
}
|
||||
// FIXME hide #[no_mangle] symbols for proc-macros
|
||||
|
||||
let is_windows = self.sess.target.is_like_windows;
|
||||
let path = tmpdir.join(if is_windows { "list.def" } else { "list" });
|
||||
|
||||
Reference in New Issue
Block a user