Skip to content

Commit

Permalink
Rebased
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Luo committed Mar 5, 2024
1 parent aa692a5 commit e74e6e7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,21 @@ fn link_natively<'a>(
}
}

if sess.target.is_like_aix {
let stripcmd = "/usr/bin/strip";
match strip {
Strip::Debuginfo => {
// FIXME: AIX's strip utility only offers option to strip line number information.
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-l"))
}
Strip::Symbols => {
// Must be noted this option removes symbol __aix_rust_metadata and thus removes .info section which contains metadata.
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-r"))
}
Strip::None => {}
}
}

Ok(())
}

Expand Down

0 comments on commit e74e6e7

Please sign in to comment.