Skip to content

Commit

Permalink
Revert back to LlvmArchiveBuilder on all platforms
Browse files Browse the repository at this point in the history
ArArchiveBuilder doesn't support reading thin archives, causing a
regression.
  • Loading branch information
bjorn3 committed Jan 27, 2023
1 parent 2cf101c commit de363d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_llvm/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ pub struct LlvmArchiveBuilderBuilder;

impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder<'a> + 'a> {
if sess.target.arch == "wasm32" || sess.target.arch == "wasm64" {
// FIXME use ArArchiveBuilder on most targets again once reading thin archives is
// implemented
if true || sess.target.arch == "wasm32" || sess.target.arch == "wasm64" {
Box::new(LlvmArchiveBuilder { sess, additions: Vec::new() })
} else {
Box::new(ArArchiveBuilder::new(sess, get_llvm_object_symbols))
Expand Down

0 comments on commit de363d5

Please sign in to comment.