Skip to content

Commit 51cfba9

Browse files
authored
Unrolled build for rust-lang#131480
Rollup merge of rust-lang#131480 - madsmtm:macos-fix-strip-binary, r=nnethercote Fix hardcoded strip path when cross-compiling from Linux to Darwin Fixes rust-lang#131206. I fear that rust-lang#131405 might end up taking some time, so opening this PR to resolve the regression. `@rustbot` label O-apple
2 parents de19f2b + 09b634a commit 51cfba9

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,9 @@ fn link_natively(
10871087
let strip = sess.opts.cg.strip;
10881088

10891089
if sess.target.is_like_osx {
1090-
let stripcmd = "/usr/bin/strip";
1090+
// Use system `strip` when running on host macOS.
1091+
// <https://github.com/rust-lang/rust/pull/130781>
1092+
let stripcmd = if cfg!(target_os = "macos") { "/usr/bin/strip" } else { "strip" };
10911093
match (strip, crate_type) {
10921094
(Strip::Debuginfo, _) => {
10931095
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))

0 commit comments

Comments
 (0)