This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1087,16 +1087,17 @@ fn link_natively(
10871087 let strip = sess. opts . cg . strip ;
10881088
10891089 if sess. target . is_like_osx {
1090+ let stripcmd = "/usr/bin/strip" ;
10901091 match ( strip, crate_type) {
10911092 ( Strip :: Debuginfo , _) => {
1092- strip_symbols_with_external_utility ( sess, "strip" , out_filename, Some ( "-S" ) )
1093+ strip_symbols_with_external_utility ( sess, stripcmd , out_filename, Some ( "-S" ) )
10931094 }
10941095 // Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
10951096 ( Strip :: Symbols , CrateType :: Dylib | CrateType :: Cdylib | CrateType :: ProcMacro ) => {
1096- strip_symbols_with_external_utility ( sess, "strip" , out_filename, Some ( "-x" ) )
1097+ strip_symbols_with_external_utility ( sess, stripcmd , out_filename, Some ( "-x" ) )
10971098 }
10981099 ( Strip :: Symbols , _) => {
1099- strip_symbols_with_external_utility ( sess, "strip" , out_filename, None )
1100+ strip_symbols_with_external_utility ( sess, stripcmd , out_filename, None )
11001101 }
11011102 ( Strip :: None , _) => { }
11021103 }
You can’t perform that action at this time.
0 commit comments