Skip to content

Commit e74e6e7

Browse files
author
Kai Luo
committed
Rebased
1 parent aa692a5 commit e74e6e7

File tree

1 file changed

+15
-0
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+15
-0
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+15
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,21 @@ fn link_natively<'a>(
10801080
}
10811081
}
10821082

1083+
if sess.target.is_like_aix {
1084+
let stripcmd = "/usr/bin/strip";
1085+
match strip {
1086+
Strip::Debuginfo => {
1087+
// FIXME: AIX's strip utility only offers option to strip line number information.
1088+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-l"))
1089+
}
1090+
Strip::Symbols => {
1091+
// Must be noted this option removes symbol __aix_rust_metadata and thus removes .info section which contains metadata.
1092+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-r"))
1093+
}
1094+
Strip::None => {}
1095+
}
1096+
}
1097+
10831098
Ok(())
10841099
}
10851100

0 commit comments

Comments
 (0)