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

Remove -Z strip. #117734

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 2 additions & 10 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ fn link_natively<'a>(
SplitDebuginfo::Packed => link_dwarf_object(sess, codegen_results, out_filename),
}

let strip = strip_value(sess);
let strip = sess.opts.cg.strip;

if sess.target.is_like_osx {
match (strip, crate_type) {
Expand Down Expand Up @@ -1070,14 +1070,6 @@ fn link_natively<'a>(
Ok(())
}

// Temporarily support both -Z strip and -C strip
fn strip_value(sess: &Session) -> Strip {
match (sess.opts.unstable_opts.strip, sess.opts.cg.strip) {
(s, Strip::None) => s,
(_, s) => s,
}
}

fn strip_symbols_with_external_utility<'a>(
sess: &'a Session,
util: &str,
Expand Down Expand Up @@ -2370,7 +2362,7 @@ fn add_order_independent_options(
);

// Pass debuginfo, NatVis debugger visualizers and strip flags down to the linker.
cmd.debuginfo(strip_value(sess), &natvis_visualizers);
cmd.debuginfo(sess.opts.cg.strip, &natvis_visualizers);

// We want to prevent the compiler from accidentally leaking in any system libraries,
// so by default we tell linkers not to link to any default libraries.
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1841,8 +1841,6 @@ written to standard error output)"),
"prefer dynamic linking to static linking for staticlibs (default: no)"),
strict_init_checks: bool = (false, parse_bool, [TRACKED],
"control if mem::uninitialized and mem::zeroed panic on more UB"),
strip: Strip = (Strip::None, parse_strip, [UNTRACKED],
"tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)"),
#[rustc_lint_opt_deny_field_access("use `Session::teach` instead of this field")]
teach: bool = (false, parse_bool, [TRACKED],
"show extended diagnostic help (default: no)"),
Expand Down
Loading