@@ -1011,11 +1011,12 @@ fn link_natively(
1011
1011
( Strip :: Debuginfo , _) => {
1012
1012
strip_with_external_utility ( sess, stripcmd, out_filename, & [ "--strip-debug" ] )
1013
1013
}
1014
- // Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
1014
+
1015
+ // Per the manpage, --discard-all is the maximum safe strip level for dynamic libraries. (#93988)
1015
1016
(
1016
1017
Strip :: Symbols ,
1017
1018
CrateType :: Dylib | CrateType :: Cdylib | CrateType :: ProcMacro | CrateType :: Sdylib ,
1018
- ) => strip_with_external_utility ( sess, stripcmd, out_filename, & [ "-x " ] ) ,
1019
+ ) => strip_with_external_utility ( sess, stripcmd, out_filename, & [ "--discard-all " ] ) ,
1019
1020
( Strip :: Symbols , _) => {
1020
1021
strip_with_external_utility ( sess, stripcmd, out_filename, & [ "--strip-all" ] )
1021
1022
}
@@ -1032,8 +1033,8 @@ fn link_natively(
1032
1033
// `llvm-strip` and hope.
1033
1034
let stripcmd = if !sess. host . is_like_solaris { "rust-objcopy" } else { "/usr/bin/strip" } ;
1034
1035
match strip {
1035
- // Always preserve the symbol table (-x).
1036
- Strip :: Debuginfo => strip_with_external_utility ( sess, stripcmd, out_filename, & [ "- x" ] ) ,
1036
+ // Do not strip the symbol table (-x).
1037
+ Strip :: Debuginfo => strip_with_external_utility ( sess, stripcmd, out_filename, & [ "x" ] ) ,
1037
1038
// Strip::Symbols is handled via the --strip-all linker option.
1038
1039
Strip :: Symbols => { }
1039
1040
Strip :: None => { }
0 commit comments