Skip to content

Commit 781210f

Browse files
committed
link: remove unused if check
The enclosing check already ensured we're on an is_like_solaris path, so this inner `if` will always be false. Inlined the local variable into its only use, but preserved the comment at the top of the block because it seems like it's still relevant.
1 parent 9a77c3c commit 781210f

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+1
-5
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1105,14 +1105,10 @@ fn link_natively(
11051105
// Many illumos systems will have both the native 'strip' utility and
11061106
// the GNU one. Use the native version explicitly and do not rely on
11071107
// what's in the path.
1108-
//
1109-
// If cross-compiling and there is not a native version, then use
1110-
// `llvm-strip` and hope.
1111-
let stripcmd = if !sess.host.is_like_solaris { "rust-objcopy" } else { "/usr/bin/strip" };
11121108
match strip {
11131109
// Always preserve the symbol table (-x).
11141110
Strip::Debuginfo => {
1115-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
1111+
strip_symbols_with_external_utility(sess, "/usr/bin/strip", out_filename, Some("-x"))
11161112
}
11171113
// Strip::Symbols is handled via the --strip-all linker option.
11181114
Strip::Symbols => {}

0 commit comments

Comments
 (0)