mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
extra/rust to 1.82.0-1
This commit is contained in:
parent
7fb81315e7
commit
363e57efd0
6 changed files with 176 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
pkgbase = rust
|
||||
pkgdesc = Systems programming language focused on safety, speed and concurrency
|
||||
pkgver = 1.81.0
|
||||
pkgver = 1.82.0
|
||||
pkgrel = 1
|
||||
epoch = 1
|
||||
url = https://www.rust-lang.org/
|
||||
|
@ -33,19 +33,21 @@ pkgbase = rust
|
|||
depends = zlib
|
||||
options = !emptydirs
|
||||
options = !lto
|
||||
source = https://static.rust-lang.org/dist/rustc-1.81.0-src.tar.gz
|
||||
source = https://static.rust-lang.org/dist/rustc-1.81.0-src.tar.gz.asc
|
||||
source = https://static.rust-lang.org/dist/rustc-1.82.0-src.tar.gz
|
||||
source = https://static.rust-lang.org/dist/rustc-1.82.0-src.tar.gz.asc
|
||||
source = 0001-bootstrap-Change-libexec-dir.patch
|
||||
source = 0002-bootstrap-Change-bash-completion-dir.patch
|
||||
source = 0003-compiler-Change-LLVM-targets.patch
|
||||
source = 0004-compiler-Use-wasm-ld-for-wasm-targets.patch
|
||||
source = 0005-Fix-enabling-wasm-component-ld-to-match-other-tools.patch
|
||||
validpgpkeys = 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE
|
||||
b2sums = 0bc0ae9207306458c6721ddaff0bf56280a4ca4918502b44cfdfc200e73c4a5af88c95f9df53c1fe927f94ffe09d855e21dd6a749331041d719704dc209940ba
|
||||
b2sums = c95ee180622a7984d03d43bcb3dd2ae16c41f95dde88426f972f32cac6ece904ced00d90967a32829db64d8790ee042192d1102426e7a2c4f6b2ff9d14c7cf70
|
||||
b2sums = SKIP
|
||||
b2sums = 074a5ba5b3fcdfa1cab266f8c566129c1851ccbc4a59c0509ae74a58b261e6b8e095034f2c8fdf7615066430c7711ed6ac99da6ef3cdc9c156e8f105fd35f95e
|
||||
b2sums = fe4d9352978fc952270bdd70e6607cd9c9fe4047cdd684acfa4ef5b19356e01c007f032b9c5aa75e5ab44be96a394fc44a9cfbb890bb95bca778b1297c1b2ba5
|
||||
b2sums = 9517c41760a5003927793db053892c1abe7b31c9f1b0a36c714c70c987d4badf9a957eac52d5bcd6bd758dc978580c134de74fd6eeb1677a604f184093ee8cc2
|
||||
b2sums = 87bdf52a50a6630ee431c6f81a1dc6b70161ba2301b457ab5cb1e8b3f1ef0be133090cc8afbf38c76b07eacef8de0829b601d253cdd620c752447efaace0a40a
|
||||
b2sums = 365d53955a5ccf4b603ed39dd06384db063441477ed76fbbb31d7a0d46c6a297d86a0b306fcb616485c229ec8965eaa36a5b91b2398991b51f37ff58bd461054
|
||||
b2sums = b0e5c8054f5364fbbc5619674923931e5d896bf56dc1cb1b09e906b7b451d44b7af78dca848e9f8e2de4f15d014187dd25301d6e704005a1efafffe586e120de
|
||||
b2sums = 963aa64d27763f063b9fac483a870563f5a71a49ec02d17b7ca0c14dbf67064ba56028bbc45f2ee50b16eada725cb55c2aa2ab17ceadff65ba9e40cb220f7a0c
|
||||
b2sums = b99ff1689f92ac50b2f64e00150ae6959cf5350dab28e773d9256ec33457684289cef37297c66943a4aa15e0128d043676fa3e498a63bd264bdff34e165e1bcc
|
||||
|
||||
pkgname = rust
|
||||
optdepends = gdb: rust-gdb script
|
||||
|
|
|
@ -9,10 +9,10 @@ Subject: [PATCH] bootstrap: Change libexec dir
|
|||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
index 1e9d2025bc78..1178e8c8ca89 100644
|
||||
index 4957de2e1b79..8cfa026ea3ee 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/dist.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
@@ -426,7 +426,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
@@ -427,7 +427,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
},
|
||||
builder.kind,
|
||||
) {
|
||||
|
@ -22,10 +22,10 @@ index 1e9d2025bc78..1178e8c8ca89 100644
|
|||
|
||||
let libdir_relative = builder.libdir_relative(compiler);
|
||||
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
index 087df2f8a88e..792ced48cfee 100644
|
||||
index 3a1eb43b801f..3acd3c7881eb 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/tool.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
@@ -846,7 +846,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
|
||||
@@ -852,7 +852,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
|
||||
|
||||
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
|
||||
// so that r-a can use it.
|
||||
|
|
|
@ -8,10 +8,10 @@ Subject: [PATCH] bootstrap: Change bash-completion dir
|
|||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
index 1178e8c8ca89..acc2846750f1 100644
|
||||
index 8cfa026ea3ee..31d55542ec64 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/dist.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
@@ -1126,7 +1126,11 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
|
||||
@@ -1112,7 +1112,11 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
|
||||
|
||||
tarball.add_file(cargo, "bin", 0o755);
|
||||
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
|
||||
|
|
|
@ -23,10 +23,10 @@ targets, as things break when this is done:
|
|||
3 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
|
||||
index e748d1ff47b6..e653865a553f 100644
|
||||
index 945bab6887e6..ccbdc3ae298e 100644
|
||||
--- a/compiler/rustc_session/src/config.rs
|
||||
+++ b/compiler/rustc_session/src/config.rs
|
||||
@@ -1997,6 +1997,10 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches
|
||||
@@ -2029,6 +2029,10 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches
|
||||
early_dcx.early_fatal(format!("target file {path:?} does not exist"))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Crichton <alex@alexcrichton.com>
|
||||
Date: Fri, 6 Sep 2024 09:21:33 -0700
|
||||
Subject: [PATCH] Fix enabling wasm-component-ld to match other tools
|
||||
|
||||
It was [pointed out recently][comment] that enabling `wasm-component-ld`
|
||||
as a host tool is different from other host tools. This commit refactors
|
||||
the logic to match by deduplicating selection of when to build other
|
||||
tools and then using the same logic for `wasm-component-ld`.
|
||||
|
||||
[comment]: https://github.com/rust-lang/rust/pull/127866#issuecomment-2333434720
|
||||
---
|
||||
src/bootstrap/src/core/build_steps/compile.rs | 2 +-
|
||||
src/bootstrap/src/core/build_steps/dist.rs | 2 +-
|
||||
src/bootstrap/src/core/build_steps/tool.rs | 38 +++----------------
|
||||
src/bootstrap/src/lib.rs | 17 +++++----
|
||||
4 files changed, 17 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
index edf18e2ebf33..596e1eb358fa 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/compile.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
@@ -1892,7 +1892,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
// delegates to the `rust-lld` binary for linking and then runs
|
||||
// logic to create the final binary. This is used by the
|
||||
// `wasm32-wasip2` target of Rust.
|
||||
- if builder.build_wasm_component_ld() {
|
||||
+ if builder.tool_enabled("wasm-component-ld") {
|
||||
let wasm_component_ld_exe =
|
||||
builder.ensure(crate::core::build_steps::tool::WasmComponentLd {
|
||||
compiler: build_compiler,
|
||||
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
index 31d55542ec64..74a230416bde 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/dist.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
@@ -473,7 +473,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
);
|
||||
}
|
||||
}
|
||||
- if builder.build_wasm_component_ld() {
|
||||
+ if builder.tool_enabled("wasm-component-ld") {
|
||||
let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
|
||||
let ld = exe("wasm-component-ld", compiler.host);
|
||||
builder.copy_link(&src_dir.join(&ld), &dst_dir.join(&ld));
|
||||
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
index 3acd3c7881eb..bb9d380fb6b2 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/tool.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
@@ -693,14 +693,7 @@ impl Step for Cargo {
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
- run.path("src/tools/cargo").default_condition(
|
||||
- builder.config.extended
|
||||
- && builder.config.tools.as_ref().map_or(
|
||||
- true,
|
||||
- // If `tools` is set, search list for this tool.
|
||||
- |tools| tools.iter().any(|tool| tool == "cargo"),
|
||||
- ),
|
||||
- )
|
||||
+ run.path("src/tools/cargo").default_condition(builder.tool_enabled("cargo"))
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
@@ -772,14 +765,7 @@ impl Step for RustAnalyzer {
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
- run.path("src/tools/rust-analyzer").default_condition(
|
||||
- builder.config.extended
|
||||
- && builder
|
||||
- .config
|
||||
- .tools
|
||||
- .as_ref()
|
||||
- .map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")),
|
||||
- )
|
||||
+ run.path("src/tools/rust-analyzer").default_condition(builder.tool_enabled("rust-analyzer"))
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
@@ -821,12 +807,8 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/rust-analyzer")
|
||||
.path("src/tools/rust-analyzer/crates/proc-macro-srv-cli")
|
||||
.default_condition(
|
||||
- builder.config.extended
|
||||
- && builder.config.tools.as_ref().map_or(true, |tools| {
|
||||
- tools.iter().any(|tool| {
|
||||
- tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv"
|
||||
- })
|
||||
- }),
|
||||
+ builder.tool_enabled("rust-analyzer")
|
||||
+ || builder.tool_enabled("rust-analyzer-proc-macro-srv"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -874,16 +856,8 @@ impl Step for LlvmBitcodeLinker {
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
- run.path("src/tools/llvm-bitcode-linker").default_condition(
|
||||
- builder.config.extended
|
||||
- && builder
|
||||
- .config
|
||||
- .tools
|
||||
- .as_ref()
|
||||
- .map_or(builder.build.unstable_features(), |tools| {
|
||||
- tools.iter().any(|tool| tool == "llvm-bitcode-linker")
|
||||
- }),
|
||||
- )
|
||||
+ run.path("src/tools/llvm-bitcode-linker")
|
||||
+ .default_condition(builder.tool_enabled("llvm-bitcode-linker"))
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
|
||||
index 82b640f54234..fb73c5ff799a 100644
|
||||
--- a/src/bootstrap/src/lib.rs
|
||||
+++ b/src/bootstrap/src/lib.rs
|
||||
@@ -1379,16 +1379,17 @@ fn default_wasi_runner(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
- /// Returns whether it's requested that `wasm-component-ld` is built as part
|
||||
- /// of the sysroot. This is done either with the `extended` key in
|
||||
- /// `config.toml` or with the `tools` set.
|
||||
- fn build_wasm_component_ld(&self) -> bool {
|
||||
- if self.config.extended {
|
||||
- return true;
|
||||
+ /// Returns whether the specified tool is configured as part of this build.
|
||||
+ ///
|
||||
+ /// This requires that both the `extended` key is set and the `tools` key is
|
||||
+ /// either unset or specifically contains the specified tool.
|
||||
+ fn tool_enabled(&self, tool: &str) -> bool {
|
||||
+ if !self.config.extended {
|
||||
+ return false;
|
||||
}
|
||||
match &self.config.tools {
|
||||
- Some(set) => set.contains("wasm-component-ld"),
|
||||
- None => false,
|
||||
+ Some(set) => set.contains(tool),
|
||||
+ None => true,
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ pkgname=(
|
|||
rust-src
|
||||
)
|
||||
epoch=1
|
||||
pkgver=1.81.0
|
||||
pkgver=1.82.0
|
||||
pkgrel=1
|
||||
pkgdesc="Systems programming language focused on safety, speed and concurrency"
|
||||
url=https://www.rust-lang.org/
|
||||
|
@ -64,13 +64,15 @@ source=(
|
|||
0002-bootstrap-Change-bash-completion-dir.patch
|
||||
0003-compiler-Change-LLVM-targets.patch
|
||||
0004-compiler-Use-wasm-ld-for-wasm-targets.patch
|
||||
0005-Fix-enabling-wasm-component-ld-to-match-other-tools.patch
|
||||
)
|
||||
b2sums=('0bc0ae9207306458c6721ddaff0bf56280a4ca4918502b44cfdfc200e73c4a5af88c95f9df53c1fe927f94ffe09d855e21dd6a749331041d719704dc209940ba'
|
||||
b2sums=('c95ee180622a7984d03d43bcb3dd2ae16c41f95dde88426f972f32cac6ece904ced00d90967a32829db64d8790ee042192d1102426e7a2c4f6b2ff9d14c7cf70'
|
||||
'SKIP'
|
||||
'074a5ba5b3fcdfa1cab266f8c566129c1851ccbc4a59c0509ae74a58b261e6b8e095034f2c8fdf7615066430c7711ed6ac99da6ef3cdc9c156e8f105fd35f95e'
|
||||
'fe4d9352978fc952270bdd70e6607cd9c9fe4047cdd684acfa4ef5b19356e01c007f032b9c5aa75e5ab44be96a394fc44a9cfbb890bb95bca778b1297c1b2ba5'
|
||||
'9517c41760a5003927793db053892c1abe7b31c9f1b0a36c714c70c987d4badf9a957eac52d5bcd6bd758dc978580c134de74fd6eeb1677a604f184093ee8cc2'
|
||||
'963aa64d27763f063b9fac483a870563f5a71a49ec02d17b7ca0c14dbf67064ba56028bbc45f2ee50b16eada725cb55c2aa2ab17ceadff65ba9e40cb220f7a0c')
|
||||
'87bdf52a50a6630ee431c6f81a1dc6b70161ba2301b457ab5cb1e8b3f1ef0be133090cc8afbf38c76b07eacef8de0829b601d253cdd620c752447efaace0a40a'
|
||||
'365d53955a5ccf4b603ed39dd06384db063441477ed76fbbb31d7a0d46c6a297d86a0b306fcb616485c229ec8965eaa36a5b91b2398991b51f37ff58bd461054'
|
||||
'b0e5c8054f5364fbbc5619674923931e5d896bf56dc1cb1b09e906b7b451d44b7af78dca848e9f8e2de4f15d014187dd25301d6e704005a1efafffe586e120de'
|
||||
'963aa64d27763f063b9fac483a870563f5a71a49ec02d17b7ca0c14dbf67064ba56028bbc45f2ee50b16eada725cb55c2aa2ab17ceadff65ba9e40cb220f7a0c'
|
||||
'b99ff1689f92ac50b2f64e00150ae6959cf5350dab28e773d9256ec33457684289cef37297c66943a4aa15e0128d043676fa3e498a63bd264bdff34e165e1bcc')
|
||||
validpgpkeys=(
|
||||
108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
|
||||
)
|
||||
|
@ -91,12 +93,16 @@ prepare() {
|
|||
# Use our wasm-ld
|
||||
patch -Np1 -i ../0004-compiler-Use-wasm-ld-for-wasm-targets.patch
|
||||
|
||||
# Use our wasm-component-ld
|
||||
# https://github.com/rust-lang/rust/pull/130034
|
||||
patch -Np1 -i ../0005-Fix-enabling-wasm-component-ld-to-match-other-tools.patch
|
||||
|
||||
cat >config.toml <<END
|
||||
# see src/bootstrap/defaults/
|
||||
profile = "dist"
|
||||
|
||||
# see src/bootstrap/src/utils/change_tracker.rs
|
||||
change-id = 127866
|
||||
change-id = 129295
|
||||
|
||||
[llvm]
|
||||
link-shared = true
|
||||
|
@ -134,12 +140,14 @@ description = "Arch Linux $pkgbase $epoch:$pkgver-$pkgrel"
|
|||
rpath = false
|
||||
lld = false
|
||||
use-lld = "external"
|
||||
llvm-bitcode-linker = false
|
||||
deny-warnings = false
|
||||
backtrace-on-ice = true
|
||||
jemalloc = true
|
||||
|
||||
[dist]
|
||||
compression-formats = ["gz"]
|
||||
compression-profile = "fast"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
cc = "/usr/bin/gcc"
|
||||
|
|
Loading…
Reference in a new issue