extra/rust to 1.67.0-2

This commit is contained in:
Kevin Mihelich 2023-01-28 17:25:54 +00:00
parent ef46edde49
commit bc5a4e3143
6 changed files with 115 additions and 69 deletions

View file

@ -4,17 +4,15 @@ Date: Thu, 6 May 2021 20:14:58 +0200
Subject: [PATCH] bootstrap: Change libexec dir
---
src/bootstrap/dist.rs | 4 ++--
src/bootstrap/tool.rs | 2 +-
.../crates/rust-analyzer/src/cli/load_cargo.rs | 2 +-
src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs | 6 ++----
4 files changed, 6 insertions(+), 8 deletions(-)
src/bootstrap/dist.rs | 4 ++--
src/bootstrap/tool.rs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 12585e80e6b7..eb596be98dca 100644
index 3cb0eccd324d..c4a76921fd06 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -394,7 +394,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
@@ -403,7 +403,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
target: compiler.host,
})
.expect("rust-analyzer-proc-macro-server always builds");
@ -23,7 +21,7 @@ index 12585e80e6b7..eb596be98dca 100644
let libdir_relative = builder.libdir_relative(compiler);
@@ -1003,7 +1003,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
@@ -1046,7 +1046,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
for dirent in fs::read_dir(cargo.parent().unwrap()).expect("read_dir") {
let dirent = dirent.expect("read dir entry");
if dirent.file_name().to_str().expect("utf8").starts_with("cargo-credential-") {
@ -33,10 +31,10 @@ index 12585e80e6b7..eb596be98dca 100644
}
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index eec74b2675a1..4bf1d7348e43 100644
index e0be4c432f16..410e787616dd 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -781,7 +781,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
@@ -783,7 +783,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
// so that r-a can use it.
@ -45,33 +43,3 @@ index eec74b2675a1..4bf1d7348e43 100644
t!(fs::create_dir_all(&libexec_path));
builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs
index 5dba545b8718..befaeb9e70db 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs
@@ -69,7 +69,7 @@ pub fn load_workspace(
if let Some(sysroot) = sysroot.as_ref() {
let standalone_server_name =
format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
- let server_path = sysroot.root().join("libexec").join(&standalone_server_name);
+ let server_path = sysroot.root().join("lib").join(&standalone_server_name);
if std::fs::metadata(&server_path).is_ok() {
path = server_path;
args = vec![];
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
index e1f651786dee..77d6efca231e 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
@@ -322,10 +322,8 @@ fn eq_ignore_build_data<'a>(
| ProjectWorkspace::Json { sysroot, .. } = ws
{
if let Some(sysroot) = sysroot.as_ref() {
- let server_path = sysroot
- .root()
- .join("libexec")
- .join(&standalone_server_name);
+ let server_path =
+ sysroot.root().join("lib").join(&standalone_server_name);
if std::fs::metadata(&server_path).is_ok() {
tracing::debug!(
"Sysroot proc-macro server exists at {}",

View file

@ -4,14 +4,14 @@ Date: Thu, 6 May 2021 20:13:31 +0200
Subject: [PATCH] cargo: Change libexec dir
---
src/cargo/ops/registry/auth.rs | 2 +-
src/cargo/util/auth.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/ops/registry/auth.rs b/src/cargo/ops/registry/auth.rs
index 648e051e6dc2..a7b24e07e552 100644
--- a/src/cargo/ops/registry/auth.rs
+++ b/src/cargo/ops/registry/auth.rs
@@ -224,7 +224,7 @@ fn sysroot_credential(
diff --git a/src/cargo/util/auth.rs b/src/cargo/util/auth.rs
index d67f874f132b..407da5a2538d 100644
--- a/src/cargo/util/auth.rs
+++ b/src/cargo/util/auth.rs
@@ -476,7 +476,7 @@ fn sysroot_credential(
.parent()
.and_then(|p| p.parent())
.ok_or_else(|| format_err!("expected cargo path {}", cargo.display()))?;

View file

@ -24,10 +24,10 @@ targets, as things break when this is done:
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index f2ee52262ade..6a813c4b8707 100644
index 7a20100fd313..33fc4c54b65c 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1832,7 +1832,7 @@ pub fn parse_target_triple(
@@ -1853,7 +1853,7 @@ pub fn parse_target_triple(
early_error(error_format, &format!("target file {path:?} does not exist"))
})
}
@ -50,10 +50,10 @@ index 73e536a7e4d9..af48d437533c 100644
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
f64:32:64-f80:32-n8:16:32-S128"
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 8909cf33af91..e5b5bce4c290 100644
index d05b8aa42006..3cbf2f5d5bfc 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2876,6 +2876,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
@@ -2944,6 +2944,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
Ok(TargetTriple::TargetJson { path_for_rustdoc: canonicalized_path, triple, contents })
}

View file

@ -9,10 +9,10 @@ We don't ship rust-lld.
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 528a84a8b37c..f8af062bc2b1 100644
index 625d3b37c4f2..413c98d5c237 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -89,8 +89,7 @@ macro_rules! args {
@@ -88,8 +88,7 @@ macro_rules! args {
// arguments just yet
limit_rdylib_exports: false,

View file

@ -0,0 +1,26 @@
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))

View file

@ -17,30 +17,55 @@ highmem=1
pkgbase=rust
pkgname=(rust rust-src)
epoch=1
pkgver=1.66.1
pkgver=1.67.0
pkgrel=2
pkgdesc="Systems programming language focused on safety, speed and concurrency"
url=https://www.rust-lang.org/
arch=(x86_64)
license=(MIT Apache)
options=(!emptydirs !strip !lto)
depends=(gcc-libs llvm-libs curl libssh2 gcc)
makedepends=(rust llvm libffi perl python cmake musl ninja
lld)
checkdepends=(procps-ng gdb)
options=(
!debug
!emptydirs
!lto
!strip
)
depends=(
curl
gcc
gcc-libs
libssh2
llvm-libs
)
makedepends=(
cmake
libffi
lld
llvm
musl
ninja
perl
python
rust
)
checkdepends=(
gdb
procps-ng
)
source=(
"https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
0001-cargo-Change-libexec-dir.patch
0001-bootstrap-Change-libexec-dir.patch
0002-compiler-Change-LLVM-targets.patch
0003-compiler-Use-wasm-ld-for-wasm-targets.patch
0004-Revert-back-to-LlvmArchiveBuilder-on-all-platforms.patch
)
sha256sums=('5b3c933a94c72187705d4ee293198babfdd09442f5937fbd685db3a81f4959ba'
sha256sums=('d029f14fce45a2ec7a9a605d2a0a40aae4739cb2fdae29ee9f7a6e9025a7fde4'
'SKIP'
'c901a9bb036c29ca092f7dbc8b447efdd9aa1044a902a88f9d024cb22681dc19'
'874c96cb43a5cc1170674771705deb1c72e95ec5f6ede860cd658111db3cda48'
'4a4ff5c294acc0b1ca800856218770f6330a878acee72193aa456d82846a8a28'
'c9abbbc8e3a97b0e43fa5f948ae4df51320d9cc5243b5d0c575470271932f783')
'b2ef8c3bca5d72ed58ff8930e69947602f875a639c2b01de5943b1ecb1b5c3c3'
'6a4e09671cd96a854cf0fc9a1f43651ac5a0fdc8dca571730131ae272b630cfe'
'e32fd355330e6c1ca4f0c630a3e254d261c48516128243a5d5d49f612cd217ed'
'f83bf98daee94d3e592fd2d96eecc25dc92b6b20575a3e3df7841a90a5b9f965'
'307c1ea2a7394ee166bc48fe3ba3d9e940dbd38d33d56824300407518df011cf')
validpgpkeys=(108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
474E22316ABF4785A88C6E8EA2C794A986419D8A) # Tom Stellard <tstellar@redhat.com>
@ -58,6 +83,11 @@ prepare() {
# Use our wasm-ld
patch -Np1 -i ../0003-compiler-Use-wasm-ld-for-wasm-targets.patch
# Fix mesa build
# https://github.com/rust-lang/rust/issues/107334
# https://github.com/rust-lang/rust/pull/107360
patch -Np1 -i ../0004-Revert-back-to-LlvmArchiveBuilder-on-all-platforms.patch
cat >config.toml <<END
changelog-seen = 2
profile = "user"
@ -71,7 +101,15 @@ rustc = "/usr/bin/rustc"
rustfmt = "/usr/bin/rustfmt"
locked-deps = true
vendor = true
tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src", "rust-demangler"]
tools = [
"cargo",
"rls",
"clippy",
"rustfmt",
"analysis",
"src",
"rust-demangler",
]
sanitizers = false
profiler = true
@ -190,11 +228,25 @@ build() {
}
package_rust() {
optdepends=('lldb: rust-lldb script'
'gdb: rust-gdb script')
provides=(cargo rustfmt)
conflicts=(cargo rustfmt 'rust-docs<1:1.56.1-3')
replaces=(cargo rustfmt cargo-tree 'rust-docs<1:1.56.1-3')
optdepends=(
'gdb: rust-gdb script'
'lldb: rust-lldb script'
)
provides=(
cargo
rustfmt
)
conflicts=(
cargo
'rust-docs<1:1.56.1-3'
rustfmt
)
replaces=(
cargo
cargo-tree
'rust-docs<1:1.56.1-3'
rustfmt
)
cp -a dest-rust/* "$pkgdir"
}