feat: impl export-executable-symbols
This commit is contained in:
@@ -2082,7 +2082,12 @@ fn add_order_independent_options(
|
||||
// sections to ensure we have all the data for PGO.
|
||||
let keep_metadata =
|
||||
crate_type == CrateType::Dylib || sess.opts.cg.profile_generate.enabled();
|
||||
cmd.gc_sections(keep_metadata);
|
||||
if crate_type != CrateType::Executable || !sess.opts.unstable_opts.export_executable_symbols
|
||||
{
|
||||
cmd.gc_sections(keep_metadata);
|
||||
} else {
|
||||
cmd.no_gc_sections();
|
||||
}
|
||||
}
|
||||
|
||||
cmd.set_output_kind(link_output_kind, out_filename);
|
||||
|
||||
Reference in New Issue
Block a user