PKGBUILDs/extra/rust/0004-Revert-back-to-LlvmArchiveBuilder-on-all-platforms.patch

27 lines
1.3 KiB
Diff
Raw Normal View History

2023-01-28 17:25:54 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Fri, 27 Jan 2023 11:48:36 +0000
Subject: [PATCH] Revert back to LlvmArchiveBuilder on all platforms
ArArchiveBuilder doesn't support reading thin archives, causing a
regression.
---
compiler/rustc_codegen_llvm/src/back/archive.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs
index 0aee1a1439b9..2cf2f585f214 100644
--- a/compiler/rustc_codegen_llvm/src/back/archive.rs
+++ b/compiler/rustc_codegen_llvm/src/back/archive.rs
@@ -108,7 +108,9 @@ fn build(mut self: Box<Self>, output: &Path) -> bool {
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))