about summary refs log tree commit diff
diff options
context:
space:
mode:
authornils <48135649+Nilstrieb@users.noreply.github.com>2023-03-28 12:51:14 +0200
committerGitHub <noreply@github.com>2023-03-28 12:51:14 +0200
commitef5ef53a6f5cc6d40a45e8041ea9e720b948108b (patch)
tree0d2ce0e8b1dbad61d4820635f1825fb2248e4406
parent7e90732abe9da454a7177971c55fa069c8d56e8d (diff)
parent8b1be44758f6b828cb556ecdc7cddc2dbfe0637f (diff)
downloadrust-ef5ef53a6f5cc6d40a45e8041ea9e720b948108b.tar.gz
rust-ef5ef53a6f5cc6d40a45e8041ea9e720b948108b.zip
Rollup merge of #109562 - bjorn3:update_ar_archive_writer, r=Mark-Simulacrum
Update ar_archive_writer to 0.1.3

This updates object to 0.30 and fixes a bug where the symbol table would be omitted for archives where there are object files yet none that export any symbol. This bug could lead to linker errors for crates like rustc_std_workspace_core which don't contain any code of their own but exist solely for their dependencies. This is likely the cause of the linker issues I was experiencing on Webassembly. It has been shown to cause issues on other platforms too.

cc rust-lang/ar_archive_writer#5
-rw-r--r--Cargo.lock6
-rw-r--r--compiler/rustc_codegen_llvm/src/back/archive.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2c99399e6b0..f0507c873d5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -106,11 +106,11 @@ checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
 
 [[package]]
 name = "ar_archive_writer"
-version = "0.1.1"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "276881980556fdadeb88aa1ffc667e4d2e8fe72531dfabcb7a82bb3c9ea9ba31"
+checksum = "b0639441fd17a3197d1cbca8dc8768cc172a63b64b4bb6c372e8f41ed0acc9bb"
 dependencies = [
- "object 0.29.0",
+ "object 0.30.1",
 ]
 
 [[package]]
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs
index a570f2af0f0..12da21dc477 100644
--- a/compiler/rustc_codegen_llvm/src/back/archive.rs
+++ b/compiler/rustc_codegen_llvm/src/back/archive.rs
@@ -110,7 +110,7 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
     fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder<'a> + 'a> {
         // FIXME use ArArchiveBuilder on most targets again once reading thin archives is
         // implemented
-        if true || sess.target.arch == "wasm32" || sess.target.arch == "wasm64" {
+        if true {
             Box::new(LlvmArchiveBuilder { sess, additions: Vec::new() })
         } else {
             Box::new(ArArchiveBuilder::new(sess, get_llvm_object_symbols))