mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Fix hardcoded strip path when cross-compiling from Linux to Darwin
This commit is contained in:
parent
fc0f045dd1
commit
09b634a4ba
@ -1087,7 +1087,9 @@ fn link_natively(
|
|||||||
let strip = sess.opts.cg.strip;
|
let strip = sess.opts.cg.strip;
|
||||||
|
|
||||||
if sess.target.is_like_osx {
|
if sess.target.is_like_osx {
|
||||||
let stripcmd = "/usr/bin/strip";
|
// Use system `strip` when running on host macOS.
|
||||||
|
// <https://github.com/rust-lang/rust/pull/130781>
|
||||||
|
let stripcmd = if cfg!(target_os = "macos") { "/usr/bin/strip" } else { "strip" };
|
||||||
match (strip, crate_type) {
|
match (strip, crate_type) {
|
||||||
(Strip::Debuginfo, _) => {
|
(Strip::Debuginfo, _) => {
|
||||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))
|
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))
|
||||||
|
Loading…
Reference in New Issue
Block a user