Commit 728f849d authored by Chaoting Liu's avatar Chaoting Liu Committed by Francesco Marinucci

rust: update to 1.43.1

parent 1d2d01ae
From 14948e9d7bdb5cc7e975c1f3435692eeb748f07b Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 27 Sep 2019 12:33:08 -0700
Subject: [PATCH] [WIP] minimize the rust-std component
---
src/bootstrap/dist.rs | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index d9dff77a30e..bd96a6371fc 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -675,36 +675,21 @@ impl Step for Std {
return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
}
- // We want to package up as many target libraries as possible
- // for the `rust-std` package, so if this is a host target we
- // depend on librustc and otherwise we just depend on libtest.
- if builder.hosts.iter().any(|t| t == target) {
- builder.ensure(compile::Rustc { compiler, target });
- } else {
- builder.ensure(compile::Std { compiler, target });
- }
+ builder.ensure(compile::Std { compiler, target });
let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
let _ = fs::remove_dir_all(&image);
- let dst = image.join("lib/rustlib").join(target);
+ let dst = image.join("lib/rustlib").join(target).join("lib");
t!(fs::create_dir_all(&dst));
- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf();
- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir
- builder.cp_filtered(&src, &dst, &|path| {
- if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
- if name == builder.config.rust_codegen_backends_dir.as_str() {
- return false
- }
- if name == "bin" {
- return false
- }
- if name.contains("LLVM") {
- return false
- }
+
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ let stamp = dbg!(compile::libstd_stamp(builder, compiler_to_use, target));
+ for (path, host) in builder.read_stamp_file(&stamp) {
+ if !host {
+ builder.copy(&path, &dst.join(path.file_name().unwrap()));
}
- true
- });
+ }
let mut cmd = rust_installer(builder);
cmd.arg("generate")
--
2.24.0
From a94fa896cc92d5e0678376cf5aa8b64af0899732 Mon Sep 17 00:00:00 2001
From: Nikita Popov <nikita.ppv@gmail.com>
Date: Tue, 4 Feb 2020 20:35:50 +0100
Subject: [PATCH 4/5] Fix timeTraceProfilerInitialize for LLVM 10
---
src/rustllvm/PassWrapper.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 90d24d20737db..9e8614e3b6d34 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() {
}
extern "C" void LLVMTimeTraceProfilerInitialize() {
-#if LLVM_VERSION_GE(9, 0)
+#if LLVM_VERSION_GE(10, 0)
+ timeTraceProfilerInitialize(
+ /* TimeTraceGranularity */ 0,
+ /* ProcName */ "rustc");
+#elif LLVM_VERSION_GE(9, 0)
timeTraceProfilerInitialize();
#endif
}
From 497f879b1e24c369362bcd821959ffabc50a8a31 Mon Sep 17 00:00:00 2001
From: Nikita Popov <nikita.ppv@gmail.com>
Date: Mon, 2 Mar 2020 22:37:55 +0100
Subject: [PATCH 5/5] Update CreateMemSet() usage for LLVM 10
---
src/rustllvm/RustWrapper.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 25cfee3373dc4..799adb418822d 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -1333,8 +1333,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
LLVMValueRef Dst, unsigned DstAlign,
LLVMValueRef Val,
LLVMValueRef Size, bool IsVolatile) {
+#if LLVM_VERSION_GE(10, 0)
+ return wrap(unwrap(B)->CreateMemSet(
+ unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
+#else
return wrap(unwrap(B)->CreateMemSet(
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
+#endif
}
extern "C" LLVMValueRef
# Contributions from Arch:
# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: userwithuid <userwithuid@gmail.com>
_llvm_ver=8.0.1
pkgname=('rust' 'lib32-rust-libs' 'rust-docs')
pkgver=1.40.0
epoch=1
pkgver=1.43.1
pkgrel=1
_llvm_ver=10.0.0
pkgdesc='Systems programming language focused on safety, speed and concurrency'
url='https://www.rust-lang.org/'
arch=('x86_64')
license=('MIT' 'Apache')
makedepends=('rust' "llvm=$_llvm_ver" 'libffi' 'lib32-gcc-libs' 'perl' 'python' 'curl' 'cmake')
makedepends=('rust' "llvm=$_llvm_ver" 'libffi' 'lib32-gcc-libs' 'perl' 'python3' 'curl' 'cmake')
checkdepends=('procps-ng' 'gdb')
options=('!emptydirs')
source=("https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
"https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz"{,.sig})
sha256sums=('dd97005578defc10a482bff3e4e728350d2099c60ffcf1f5e189540c39a549ad'
"https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz"{,.sig}
70163.patch)
sha256sums=('cde177b4a8c687da96f20de27630a1eb55c9d146a15e4c900d5c31cd3c3ac41d'
'SKIP'
'6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75'
'SKIP'
'11828fb4823387d820c6715b25f6b2405e60837d12a7469e7a8882911c721837'
'SKIP')
'8c534799254d5e0124479875a3f90ff1537840a6d3848dab5f76ce55fe4f63e3')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
......@@ -28,6 +32,9 @@ validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag a
prepare() {
cd "rustc-$pkgver-src"
# LLVM 10
patch -Np1 -i ../70163.patch
cat >config.toml <<END
[llvm]
link-shared = true
......@@ -79,6 +86,8 @@ build() {
package_rust() {
depends=('gcc-libs' 'llvm-libs' 'curl' 'libssh2')
optdepends=('lldb: rust-lldb script'
'gdb: rust-gdb script')
provides=('cargo' 'rustfmt')
conflicts=('cargo' 'rustfmt')
replaces=('cargo' 'rustfmt')
......@@ -124,3 +133,5 @@ package_rust-docs() {
install -d "$pkgdir"/usr/share/doc
mv dest-doc/* "$pkgdir"/usr/share/doc
}
# vim:set ts=2 sw=2 et:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment