rust: add patch to limit internalization
without this patch, some packages fail to build on i686 [ci skip]
This commit is contained in:
parent
e6af3350a1
commit
c418f3830b
|
@ -0,0 +1,27 @@
|
|||
From b4131e297e18fde119f6f461b3e622218166b009 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 26 Apr 2019 08:58:14 -0700
|
||||
Subject: [PATCH] Limit internalization in LLVM 8 ThinLTO
|
||||
|
||||
---
|
||||
src/rustllvm/PassWrapper.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
|
||||
index 319c66a21f17..0ebef82d3768 100644
|
||||
--- a/src/rustllvm/PassWrapper.cpp
|
||||
+++ b/src/rustllvm/PassWrapper.cpp
|
||||
@@ -873,8 +873,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
|
||||
return PrevailingType::Unknown;
|
||||
};
|
||||
#if LLVM_VERSION_GE(8, 0)
|
||||
+ // We don't have a complete picture in our use of ThinLTO, just our immediate
|
||||
+ // crate, so we need `ImportEnabled = false` to limit internalization.
|
||||
+ // Otherwise, we sometimes lose `static` values -- see #60184.
|
||||
computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
|
||||
- deadIsPrevailing, /* ImportEnabled = */ true);
|
||||
+ deadIsPrevailing, /* ImportEnabled = */ false);
|
||||
#else
|
||||
computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing);
|
||||
#endif
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'rust'
|
||||
pkgname=rust
|
||||
version=1.35.0
|
||||
revision=1
|
||||
revision=2
|
||||
_rust_dist_version=1.35.0
|
||||
_cargo_dist_version=0.36.0
|
||||
# Always make sure custom distfiles used for bootstrap are
|
||||
|
|
Loading…
Reference in New Issue