@@ -1107,22 +1107,20 @@ fn link_natively(
11071107 let stripcmd = "rust-objcopy" ;
11081108 match ( strip, crate_type) {
11091109 ( Strip :: Debuginfo , _) => {
1110- let strip_options = vec ! [ "-S" ] ;
11111110 strip_symbols_with_external_utility (
11121111 sess,
11131112 stripcmd,
11141113 out_filename,
1115- Some ( & strip_options ) ,
1114+ Some ( & [ "-S" ] ) ,
11161115 )
11171116 }
11181117 // Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
11191118 ( Strip :: Symbols , CrateType :: Dylib | CrateType :: Cdylib | CrateType :: ProcMacro ) => {
1120- let strip_options = vec ! [ "-x" ] ;
11211119 strip_symbols_with_external_utility (
11221120 sess,
11231121 stripcmd,
11241122 out_filename,
1125- Some ( & strip_options ) ,
1123+ Some ( & [ "-x" ] ) ,
11261124 )
11271125 }
11281126 ( Strip :: Symbols , _) => {
@@ -1143,12 +1141,11 @@ fn link_natively(
11431141 match strip {
11441142 // Always preserve the symbol table (-x).
11451143 Strip :: Debuginfo => {
1146- let strip_options = vec ! [ "-x" ] ;
11471144 strip_symbols_with_external_utility (
11481145 sess,
11491146 stripcmd,
11501147 out_filename,
1151- Some ( & strip_options ) ,
1148+ Some ( & [ "-x" ] ) ,
11521149 )
11531150 }
11541151 // Strip::Symbols is handled via the --strip-all linker option.
@@ -1163,26 +1160,23 @@ fn link_natively(
11631160 sess. dcx ( ) . emit_warn ( errors:: AixStripNotUsed ) ;
11641161 }
11651162 let stripcmd = "/usr/bin/strip" ;
1166- let mut strip_options = vec ! [ "-X32_64" ] ;
11671163 match strip {
11681164 Strip :: Debuginfo => {
11691165 // FIXME: AIX's strip utility only offers option to strip line number information.
1170- strip_options. push ( "-l" ) ;
11711166 strip_symbols_with_external_utility (
11721167 sess,
11731168 stripcmd,
11741169 out_filename,
1175- Some ( & strip_options ) ,
1170+ Some ( & [ "-X32_64" , "-l" ] ) ,
11761171 )
11771172 }
11781173 Strip :: Symbols => {
11791174 // Must be noted this option might remove symbol __aix_rust_metadata and thus removes .info section which contains metadata.
1180- strip_options. push ( "-r" ) ;
11811175 strip_symbols_with_external_utility (
11821176 sess,
11831177 stripcmd,
11841178 out_filename,
1185- Some ( & strip_options ) ,
1179+ Some ( & [ "-X32_64" , "-r" ] ) ,
11861180 )
11871181 }
11881182 Strip :: None => { }
0 commit comments