Remove -Z strip
. · rust-lang/rust@ecc936b (original) (raw)
File tree
2 files changed
lines changed
- rustc_codegen_ssa/src/back
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1033,7 +1033,7 @@ fn link_natively<'a>( | ||
1033 | 1033 | SplitDebuginfo::Packed => link_dwarf_object(sess, codegen_results, out_filename), |
1034 | 1034 | } |
1035 | 1035 | |
1036 | -let strip = strip_value(sess); | |
1036 | +let strip = sess.opts.cg.strip; | |
1037 | 1037 | |
1038 | 1038 | if sess.target.is_like_osx { |
1039 | 1039 | match (strip, crate_type) { |
@@ -1070,14 +1070,6 @@ fn link_natively<'a>( | ||
1070 | 1070 | Ok(()) |
1071 | 1071 | } |
1072 | 1072 | |
1073 | -// Temporarily support both -Z strip and -C strip | |
1074 | -fn strip_value(sess: &Session) -> Strip { | |
1075 | -match (sess.opts.unstable_opts.strip, sess.opts.cg.strip) { | |
1076 | -(s, Strip::None) => s, | |
1077 | -(_, s) => s, | |
1078 | -} | |
1079 | -} | |
1080 | - | |
1081 | 1073 | fn strip_symbols_with_external_utility<'a>( |
1082 | 1074 | sess: &'a Session, |
1083 | 1075 | util: &str, |
@@ -2370,7 +2362,7 @@ fn add_order_independent_options( | ||
2370 | 2362 | ); |
2371 | 2363 | |
2372 | 2364 | // Pass debuginfo, NatVis debugger visualizers and strip flags down to the linker. |
2373 | - cmd.debuginfo(strip_value(sess), &natvis_visualizers); | |
2365 | + cmd.debuginfo(sess.opts.cg.strip, &natvis_visualizers); | |
2374 | 2366 | |
2375 | 2367 | // We want to prevent the compiler from accidentally leaking in any system libraries, |
2376 | 2368 | // so by default we tell linkers not to link to any default libraries. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1841,8 +1841,6 @@ written to standard error output)"), | ||
1841 | 1841 | "prefer dynamic linking to static linking for staticlibs (default: no)"), |
1842 | 1842 | strict_init_checks: bool = (false, parse_bool, [TRACKED], |
1843 | 1843 | "control if mem::uninitialized and mem::zeroed panic on more UB"), |
1844 | - strip: Strip = (Strip::None, parse_strip, [UNTRACKED], | |
1845 | -"tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)"), | |
1846 | 1844 | #[rustc_lint_opt_deny_field_access("use `Session::teach` instead of this field")] |
1847 | 1845 | teach: bool = (false, parse_bool, [TRACKED], |
1848 | 1846 | "show extended diagnostic help (default: no)"), |