Update to Rust 1.81.0
This commit is contained in:
parent
295d43e43e
commit
6aa3bad390
2
.gitignore
vendored
2
.gitignore
vendored
@ -439,3 +439,5 @@
|
||||
/wasi-libc-wasi-sdk-22.tar.gz
|
||||
/rustc-1.80.0-src.tar.xz
|
||||
/rustc-1.80.1-src.tar.xz
|
||||
/wasi-libc-3f43ea9abb24ed8d24d760989e1d87ea385f8eaa.tar.gz
|
||||
/rustc-1.81.0-src.tar.xz
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 26fa5c2c300f3c3a3ee3109c009bd4a6803a2a4c Mon Sep 17 00:00:00 2001
|
||||
From: Nikita Popov <npopov@redhat.com>
|
||||
Date: Tue, 11 Jun 2024 10:13:07 +0200
|
||||
Subject: [PATCH] Make issue-122805.rs big endian compatible
|
||||
|
||||
Instead of not generating the function at all on big endian (which
|
||||
makes the CHECK lines fail), instead use to_le() on big endian,
|
||||
so that we essentially perform a bswap for both endiannesses.
|
||||
---
|
||||
tests/codegen/issues/issue-122805.rs | 21 ++++++++++++---------
|
||||
1 file changed, 12 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/tests/codegen/issues/issue-122805.rs b/tests/codegen/issues/issue-122805.rs
|
||||
index 6d108ada6dd..8e03c6c8884 100644
|
||||
--- a/tests/codegen/issues/issue-122805.rs
|
||||
+++ b/tests/codegen/issues/issue-122805.rs
|
||||
@@ -39,17 +39,20 @@
|
||||
// OPT3WINX64-NEXT: store <8 x i16>
|
||||
// CHECK-NEXT: ret void
|
||||
#[no_mangle]
|
||||
-#[cfg(target_endian = "little")]
|
||||
pub fn convert(value: [u16; 8]) -> [u8; 16] {
|
||||
+ #[cfg(target_endian = "little")]
|
||||
+ let bswap = u16::to_be;
|
||||
+ #[cfg(target_endian = "big")]
|
||||
+ let bswap = u16::to_le;
|
||||
let addr16 = [
|
||||
- value[0].to_be(),
|
||||
- value[1].to_be(),
|
||||
- value[2].to_be(),
|
||||
- value[3].to_be(),
|
||||
- value[4].to_be(),
|
||||
- value[5].to_be(),
|
||||
- value[6].to_be(),
|
||||
- value[7].to_be(),
|
||||
+ bswap(value[0]),
|
||||
+ bswap(value[1]),
|
||||
+ bswap(value[2]),
|
||||
+ bswap(value[3]),
|
||||
+ bswap(value[4]),
|
||||
+ bswap(value[5]),
|
||||
+ bswap(value[6]),
|
||||
+ bswap(value[7]),
|
||||
];
|
||||
unsafe { core::mem::transmute::<_, [u8; 16]>(addr16) }
|
||||
}
|
||||
--
|
||||
2.45.1
|
||||
|
@ -1,19 +1,21 @@
|
||||
From 61b5cc96337da2121221dd1bcdb63fd36551d065 Mon Sep 17 00:00:00 2001
|
||||
From 3d8c6d095581e8d7585f3772cfd16f6367f3c008 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 1 Nov 2023 15:21:15 -0700
|
||||
Date: Fri, 16 Aug 2024 10:12:58 -0700
|
||||
Subject: [PATCH] Use lld provided by system
|
||||
|
||||
---
|
||||
compiler/rustc_target/src/spec/base/wasm.rs | 3 +--
|
||||
compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs | 1 +
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
compiler/rustc_target/src/spec/base/wasm.rs | 3 +--
|
||||
.../src/spec/targets/aarch64_unknown_none_softfloat.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs | 1 +
|
||||
compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs | 1 +
|
||||
5 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs
|
||||
index 87ade9e58cf4..2ddff95febab 100644
|
||||
index f237391016e7..08bcd9699b4a 100644
|
||||
--- a/compiler/rustc_target/src/spec/base/wasm.rs
|
||||
+++ b/compiler/rustc_target/src/spec/base/wasm.rs
|
||||
@@ -91,8 +91,7 @@ macro_rules! args {
|
||||
@@ -85,8 +85,7 @@ macro_rules! args {
|
||||
// arguments just yet
|
||||
limit_rdylib_exports: false,
|
||||
|
||||
@ -23,8 +25,33 @@ index 87ade9e58cf4..2ddff95febab 100644
|
||||
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
|
||||
|
||||
pre_link_args,
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs
|
||||
index 222d5651b521..4b780bc8a8e7 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs
|
||||
@@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||
let opts = TargetOptions {
|
||||
abi: "softfloat".into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
features: "+v8a,+strict-align,-neon,-fp-armv8".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
disable_redzone: true,
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs
|
||||
index 429303170b6b..19d4ec53f6d8 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs
|
||||
@@ -9,6 +9,7 @@ pub fn target() -> Target {
|
||||
base.max_atomic_width = Some(128);
|
||||
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]);
|
||||
base.features = "+v8a".into();
|
||||
+ base.linker = Some("lld".into());
|
||||
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-windows".into(),
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs
|
||||
index 9aa95a35f8e5..a9172f9441b7 100644
|
||||
index 549706998d46..b7e9158ddef5 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
@ -33,11 +60,11 @@ index 9aa95a35f8e5..a9172f9441b7 100644
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
features:
|
||||
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float"
|
||||
.into(),
|
||||
features: "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float".into(),
|
||||
supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS,
|
||||
disable_redzone: true,
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs
|
||||
index 5abfb8162f70..13cb43bda1a4 100644
|
||||
index 6da1fcca58c8..c84ae44576d4 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs
|
||||
@@ -16,6 +16,7 @@ pub fn target() -> Target {
|
||||
@ -48,28 +75,6 @@ index 5abfb8162f70..13cb43bda1a4 100644
|
||||
|
||||
// We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to
|
||||
// enable these CPU features explicitly before their first use, otherwise their instructions
|
||||
diff -Naur a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs
|
||||
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs 2024-03-17 12:03:00.000000000 -0700
|
||||
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs 2024-03-22 10:02:17.742806274 -0700
|
||||
@@ -14,7 +14,7 @@
|
||||
let opts = TargetOptions {
|
||||
abi: "softfloat".into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
features: "+v8a,+strict-align,-neon,-fp-armv8".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
disable_redzone: true,
|
||||
--
|
||||
2.41.0
|
||||
2.46.0
|
||||
|
||||
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs 2024-04-09 19:20:09.000000000 +0200
|
||||
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs 2024-04-26 11:22:31.988601550 +0200
|
||||
@@ -9,6 +9,7 @@ pub fn target() -> Target {
|
||||
base.max_atomic_width = Some(128);
|
||||
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]);
|
||||
base.features = "+v8a".into();
|
||||
+ base.linker = Some("lld".into());
|
||||
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-windows".into(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b99134e2884fa56bcab6d360885ec5421048e66 Mon Sep 17 00:00:00 2001
|
||||
From 937b23ef51b1d2f3d12adc9bd90dfd27936326dd Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Thu, 28 Sep 2023 18:14:28 -0700
|
||||
Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained
|
||||
@ -11,10 +11,10 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained
|
||||
4 files changed, 22 insertions(+)
|
||||
|
||||
diff --git a/config.example.toml b/config.example.toml
|
||||
index f94553dd63f7..5ec969c80a37 100644
|
||||
index 26687bcfb370..381a23f9cead 100644
|
||||
--- a/config.example.toml
|
||||
+++ b/config.example.toml
|
||||
@@ -869,6 +869,11 @@
|
||||
@@ -872,6 +872,11 @@
|
||||
# argument as the test binary.
|
||||
#runner = <none> (string)
|
||||
|
||||
@ -27,10 +27,10 @@ index f94553dd63f7..5ec969c80a37 100644
|
||||
# Distribution options
|
||||
#
|
||||
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
index e927b491c71e..69a80d01d6b9 100644
|
||||
index 3e79acad1c4b..525b6e956405 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/compile.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
@@ -356,6 +356,10 @@ fn copy_self_contained_objects(
|
||||
@@ -357,6 +357,10 @@ fn copy_self_contained_objects(
|
||||
compiler: &Compiler,
|
||||
target: TargetSelection,
|
||||
) -> Vec<(PathBuf, DependencyType)> {
|
||||
@ -42,10 +42,10 @@ index e927b491c71e..69a80d01d6b9 100644
|
||||
t!(fs::create_dir_all(&libdir_self_contained));
|
||||
let mut target_deps = vec![];
|
||||
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
|
||||
index 3e1bc9a9acdd..5e24a9cc4f60 100644
|
||||
index 9d5aa795c6c0..720dc53514d3 100644
|
||||
--- a/src/bootstrap/src/core/config/config.rs
|
||||
+++ b/src/bootstrap/src/core/config/config.rs
|
||||
@@ -586,6 +586,7 @@ pub struct Target {
|
||||
@@ -565,6 +565,7 @@ pub struct Target {
|
||||
pub runner: Option<String>,
|
||||
pub no_std: bool,
|
||||
pub codegen_backends: Option<Vec<String>>,
|
||||
@ -53,7 +53,7 @@ index 3e1bc9a9acdd..5e24a9cc4f60 100644
|
||||
}
|
||||
|
||||
impl Target {
|
||||
@@ -594,6 +595,9 @@ pub fn from_triple(triple: &str) -> Self {
|
||||
@@ -573,6 +574,9 @@ pub fn from_triple(triple: &str) -> Self {
|
||||
if triple.contains("-none") || triple.contains("nvptx") || triple.contains("switch") {
|
||||
target.no_std = true;
|
||||
}
|
||||
@ -63,7 +63,7 @@ index 3e1bc9a9acdd..5e24a9cc4f60 100644
|
||||
target
|
||||
}
|
||||
}
|
||||
@@ -1150,6 +1154,7 @@ struct TomlTarget {
|
||||
@@ -1140,6 +1144,7 @@ struct TomlTarget {
|
||||
no_std: Option<bool> = "no-std",
|
||||
codegen_backends: Option<Vec<String>> = "codegen-backends",
|
||||
runner: Option<String> = "runner",
|
||||
@ -71,7 +71,7 @@ index 3e1bc9a9acdd..5e24a9cc4f60 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1870,6 +1875,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
|
||||
@@ -1900,6 +1905,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
|
||||
if let Some(s) = cfg.no_std {
|
||||
target.no_std = s;
|
||||
}
|
||||
@ -82,10 +82,10 @@ index 3e1bc9a9acdd..5e24a9cc4f60 100644
|
||||
target.cxx = cfg.cxx.map(PathBuf::from);
|
||||
target.ar = cfg.ar.map(PathBuf::from);
|
||||
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
|
||||
index 5ed6b357e20a..c23b21d65713 100644
|
||||
index a8555b2c3673..70c41b51eb96 100644
|
||||
--- a/src/bootstrap/src/lib.rs
|
||||
+++ b/src/bootstrap/src/lib.rs
|
||||
@@ -1348,6 +1348,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
|
||||
@@ -1361,6 +1361,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
|
||||
self.config.target_config.get(&target).map(|t| t.no_std)
|
||||
}
|
||||
|
||||
@ -98,5 +98,5 @@ index 5ed6b357e20a..c23b21d65713 100644
|
||||
/// and `remote-test-server` binaries.
|
||||
fn remote_tested(&self, target: TargetSelection) -> bool {
|
||||
--
|
||||
2.44.0
|
||||
2.46.0
|
||||
|
||||
|
103
0001-handle-no_std-targets-on-std-builds.patch
Normal file
103
0001-handle-no_std-targets-on-std-builds.patch
Normal file
@ -0,0 +1,103 @@
|
||||
From c41f254ad192a4ab402b40f8bdad169a8163140a Mon Sep 17 00:00:00 2001
|
||||
From: onur-ozkan <work@onurozkan.dev>
|
||||
Date: Thu, 25 Jul 2024 15:59:25 +0300
|
||||
Subject: [PATCH] handle no_std targets on std builds
|
||||
|
||||
This change unifies the `Step::run_make` logic and improves it by skipping
|
||||
std specific crates for no_std targets.
|
||||
|
||||
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
||||
(cherry picked from commit 6e247195c644aa924a10c98cc8eb3a28e1a87929)
|
||||
---
|
||||
src/bootstrap/src/core/build_steps/check.rs | 4 ++--
|
||||
src/bootstrap/src/core/build_steps/clippy.rs | 3 ++-
|
||||
src/bootstrap/src/core/build_steps/compile.rs | 23 +++++++++++++++----
|
||||
3 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs
|
||||
index 8235d4634b75..bbad3f179ac7 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/check.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/check.rs
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Implementation of compiling the compiler and standard library, in "check"-based modes.
|
||||
|
||||
use crate::core::build_steps::compile::{
|
||||
- add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo,
|
||||
+ add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo, std_crates_for_run_make,
|
||||
};
|
||||
use crate::core::build_steps::tool::{prepare_tool_cargo, SourceType};
|
||||
use crate::core::builder::{
|
||||
@@ -47,7 +47,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
- let crates = run.make_run_crates(Alias::Library);
|
||||
+ let crates = std_crates_for_run_make(&run);
|
||||
run.builder.ensure(Std { target: run.target, crates });
|
||||
}
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs
|
||||
index 40a2112b1925..a3ab094d799d 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/clippy.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/clippy.rs
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::builder::ShouldRun;
|
||||
+use crate::core::build_steps::compile::std_crates_for_run_make;
|
||||
use crate::core::builder;
|
||||
use crate::core::builder::crate_description;
|
||||
use crate::core::builder::Alias;
|
||||
@@ -122,7 +123,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
- let crates = run.make_run_crates(Alias::Library);
|
||||
+ let crates = std_crates_for_run_make(&run);
|
||||
run.builder.ensure(Std { target: run.target, crates });
|
||||
}
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
index 525b6e956405..19c8cbc54080 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/compile.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/compile.rs
|
||||
@@ -127,11 +127,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
- // If the paths include "library", build the entire standard library.
|
||||
- let has_alias =
|
||||
- run.paths.iter().any(|set| set.assert_single_path().path.ends_with("library"));
|
||||
- let crates = if has_alias { Default::default() } else { run.cargo_crates_in_set() };
|
||||
-
|
||||
+ let crates = std_crates_for_run_make(&run);
|
||||
run.builder.ensure(Std {
|
||||
compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
|
||||
target: run.target,
|
||||
@@ -428,6 +424,23 @@ fn copy_self_contained_objects(
|
||||
target_deps
|
||||
}
|
||||
|
||||
+/// Resolves standard library crates for `Std::run_make` for any build kind (like check, build, clippy, etc.).
|
||||
+pub fn std_crates_for_run_make(run: &RunConfig<'_>) -> Vec<String> {
|
||||
+ let has_alias = run.paths.iter().any(|set| set.assert_single_path().path.ends_with("library"));
|
||||
+ let target_is_no_std = run.builder.no_std(run.target).unwrap_or(false);
|
||||
+
|
||||
+ // For no_std targets, do not add any additional crates to the compilation other than what `compile::std_cargo` already adds for no_std targets.
|
||||
+ if target_is_no_std {
|
||||
+ vec![]
|
||||
+ }
|
||||
+ // If the paths include "library", build the entire standard library.
|
||||
+ else if has_alias {
|
||||
+ run.make_run_crates(builder::Alias::Library)
|
||||
+ } else {
|
||||
+ run.cargo_crates_in_set()
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/// Configure cargo to compile the standard library, adding appropriate env vars
|
||||
/// and such.
|
||||
pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, cargo: &mut Cargo) {
|
||||
--
|
||||
2.46.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e3b7d2e3d3b4fcbc6591de606957c0fd59b5e547 Mon Sep 17 00:00:00 2001
|
||||
From 348b03695d916ab23a9d66c4ceed2ecbecfc68e7 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Thu, 28 Sep 2023 18:18:16 -0700
|
||||
Subject: [PATCH 2/2] set an external library path for wasm32-wasi
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH 2/2] set an external library path for wasm32-wasi
|
||||
3 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
|
||||
index f5e8d5fc92a9..f4ad3f725427 100644
|
||||
index 8c582fac0d82..169d86cd6224 100644
|
||||
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
|
||||
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
|
||||
@@ -1563,6 +1563,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
|
||||
@@ -1586,6 +1586,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
|
||||
return file_path;
|
||||
}
|
||||
}
|
||||
@ -26,7 +26,7 @@ index f5e8d5fc92a9..f4ad3f725427 100644
|
||||
for search_path in fs.search_paths() {
|
||||
let file_path = search_path.dir.join(name);
|
||||
if file_path.exists() {
|
||||
@@ -2049,6 +2055,9 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
|
||||
@@ -2076,6 +2082,9 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
|
||||
let lib_path = sess.target_filesearch(PathKind::All).get_self_contained_lib_path();
|
||||
cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
|
||||
}
|
||||
@ -37,10 +37,10 @@ index f5e8d5fc92a9..f4ad3f725427 100644
|
||||
|
||||
/// Add options making relocation sections in the produced ELF files read-only
|
||||
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
|
||||
index 941d767b850d..cd0a2ce51989 100644
|
||||
index 607eeac7ccdc..63070622502e 100644
|
||||
--- a/compiler/rustc_target/src/spec/mod.rs
|
||||
+++ b/compiler/rustc_target/src/spec/mod.rs
|
||||
@@ -1881,6 +1881,7 @@ pub struct TargetOptions {
|
||||
@@ -2033,6 +2033,7 @@ pub struct TargetOptions {
|
||||
/// Objects to link before and after all other object code.
|
||||
pub pre_link_objects: CrtObjects,
|
||||
pub post_link_objects: CrtObjects,
|
||||
@ -48,7 +48,7 @@ index 941d767b850d..cd0a2ce51989 100644
|
||||
/// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
|
||||
pub pre_link_objects_self_contained: CrtObjects,
|
||||
pub post_link_objects_self_contained: CrtObjects,
|
||||
@@ -2368,6 +2369,7 @@ fn default() -> TargetOptions {
|
||||
@@ -2520,6 +2521,7 @@ fn default() -> TargetOptions {
|
||||
relro_level: RelroLevel::None,
|
||||
pre_link_objects: Default::default(),
|
||||
post_link_objects: Default::default(),
|
||||
@ -56,7 +56,7 @@ index 941d767b850d..cd0a2ce51989 100644
|
||||
pre_link_objects_self_contained: Default::default(),
|
||||
post_link_objects_self_contained: Default::default(),
|
||||
link_self_contained: LinkSelfContainedDefault::False,
|
||||
@@ -3064,6 +3066,7 @@ macro_rules! key {
|
||||
@@ -3202,6 +3204,7 @@ macro_rules! key {
|
||||
key!(linker_is_gnu_json = "linker-is-gnu", bool);
|
||||
key!(pre_link_objects = "pre-link-objects", link_objects);
|
||||
key!(post_link_objects = "post-link-objects", link_objects);
|
||||
@ -64,7 +64,7 @@ index 941d767b850d..cd0a2ce51989 100644
|
||||
key!(pre_link_objects_self_contained = "pre-link-objects-fallback", link_objects);
|
||||
key!(post_link_objects_self_contained = "post-link-objects-fallback", link_objects);
|
||||
// Deserializes the backwards-compatible variants of `-Clink-self-contained`
|
||||
@@ -3327,6 +3330,7 @@ macro_rules! target_option_val {
|
||||
@@ -3464,6 +3467,7 @@ macro_rules! target_option_val {
|
||||
target_option_val!(linker_is_gnu_json, "linker-is-gnu");
|
||||
target_option_val!(pre_link_objects);
|
||||
target_option_val!(post_link_objects);
|
||||
@ -73,11 +73,11 @@ index 941d767b850d..cd0a2ce51989 100644
|
||||
target_option_val!(post_link_objects_self_contained, "post-link-objects-fallback");
|
||||
target_option_val!(link_args - pre_link_args_json, "pre-link-args");
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
|
||||
index 7cbe9f09e6ca..b524890c2ec5 100644
|
||||
index a8e7f22c0689..55949557d6bb 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
|
||||
@@ -20,11 +20,12 @@ pub fn target() -> Target {
|
||||
options.os = "wasi".into();
|
||||
@@ -21,11 +21,12 @@ pub fn target() -> Target {
|
||||
options.env = "p1".into();
|
||||
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]);
|
||||
|
||||
- options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();
|
||||
@ -93,5 +93,5 @@ index 7cbe9f09e6ca..b524890c2ec5 100644
|
||||
// Right now this is a bit of a workaround but we're currently saying that
|
||||
// the target by default has a static crt which we're taking as a signal
|
||||
--
|
||||
2.44.0
|
||||
2.46.0
|
||||
|
||||
|
31
rust.spec
31
rust.spec
@ -1,5 +1,5 @@
|
||||
Name: rust
|
||||
Version: 1.80.1
|
||||
Version: 1.81.0
|
||||
Release: %autorelease
|
||||
Summary: The Rust Programming Language
|
||||
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
||||
@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches}
|
||||
# To bootstrap from scratch, set the channel and date from src/stage0.json
|
||||
# e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13
|
||||
# or nightly wants some beta-YYYY-MM-DD
|
||||
%global bootstrap_version 1.79.0
|
||||
%global bootstrap_channel 1.79.0
|
||||
%global bootstrap_date 2024-06-13
|
||||
%global bootstrap_version 1.80.1
|
||||
%global bootstrap_channel 1.80.1
|
||||
%global bootstrap_date 2024-08-08
|
||||
|
||||
# Only the specified arches will use bootstrap binaries.
|
||||
# NOTE: Those binaries used to be uploaded with every new release, but that was
|
||||
@ -55,7 +55,8 @@ ExclusiveArch: %{rust_arches}
|
||||
# We need CRT files for *-wasi targets, at least as new as the commit in
|
||||
# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
|
||||
%global wasi_libc_url https://github.com/WebAssembly/wasi-libc
|
||||
%global wasi_libc_ref wasi-sdk-22
|
||||
#global wasi_libc_ref wasi-sdk-23
|
||||
%global wasi_libc_ref 3f43ea9abb24ed8d24d760989e1d87ea385f8eaa
|
||||
%global wasi_libc_name wasi-libc-%{wasi_libc_ref}
|
||||
%global wasi_libc_source %{wasi_libc_url}/archive/%{wasi_libc_ref}/%{wasi_libc_name}.tar.gz
|
||||
%global wasi_libc_dir %{_builddir}/%{wasi_libc_name}
|
||||
@ -78,10 +79,10 @@ ExclusiveArch: %{rust_arches}
|
||||
|
||||
# Requires stable libgit2 1.7, and not the next minor soname change.
|
||||
# This needs to be consistent with the bindings in vendor/libgit2-sys.
|
||||
%global min_libgit2_version 1.7.2
|
||||
%global next_libgit2_version 1.8.0~
|
||||
%global bundled_libgit2_version 1.7.2
|
||||
%if 0%{?fedora} >= 39
|
||||
%global min_libgit2_version 1.8.1
|
||||
%global next_libgit2_version 1.9.0~
|
||||
%global bundled_libgit2_version 1.8.1
|
||||
%if 0%{?fedora} >= 42
|
||||
%bcond_with bundled_libgit2
|
||||
%else
|
||||
%bcond_without bundled_libgit2
|
||||
@ -155,10 +156,11 @@ Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
|
||||
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
|
||||
|
||||
# We don't want to use the bundled library in libsqlite3-sys
|
||||
Patch6: rustc-1.80.0-unbundle-sqlite.patch
|
||||
Patch6: rustc-1.81.0-unbundle-sqlite.patch
|
||||
|
||||
# Fix codegen test failure on big endian: https://github.com/rust-lang/rust/pull/126263
|
||||
Patch7: 0001-Make-issue-122805.rs-big-endian-compatible.patch
|
||||
# handle no_std targets on std builds
|
||||
# https://github.com/rust-lang/rust/pull/128182
|
||||
Patch7: 0001-handle-no_std-targets-on-std-builds.patch
|
||||
|
||||
### RHEL-specific patches below ###
|
||||
|
||||
@ -169,7 +171,7 @@ Source102: cargo_vendor.attr
|
||||
Source103: cargo_vendor.prov
|
||||
|
||||
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
|
||||
Patch100: rustc-1.80.0-disable-libssh2.patch
|
||||
Patch100: rustc-1.81.0-disable-libssh2.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
@ -329,6 +331,7 @@ Requires: /usr/bin/cc
|
||||
# - wasm targets lost the archive index, which we were repairing with llvm-ranlib
|
||||
# - uefi targets couldn't link builtins like memcpy, possibly due to lost COMDAT flags
|
||||
%global __brp_strip_static_archive %{nil}
|
||||
%global __brp_strip_lto %{nil}
|
||||
|
||||
%if %{without bundled_llvm}
|
||||
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1}
|
||||
@ -832,6 +835,8 @@ test -r "%{profiler}"
|
||||
%{!?llvm_has_filecheck: --disable-codegen-tests} \
|
||||
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
||||
--disable-llvm-static-stdcpp \
|
||||
--disable-llvm-bitcode-linker \
|
||||
--disable-lld \
|
||||
--disable-rpath \
|
||||
%{enable_debuginfo} \
|
||||
%{enable_rust_opts} \
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-07-05 18:14:51.101370053 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-07-05 18:14:51.104370020 -0700
|
||||
@@ -2151,7 +2151,6 @@ checksum = "ee4126d8b4ee5c9d9ea891dd875c
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-08-26 09:03:52.769956890 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-08-26 09:03:52.773956573 -0700
|
||||
@@ -2155,7 +2155,6 @@ checksum = "10472326a8a6477c3c20a64547b0
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -9,7 +9,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -2192,20 +2191,6 @@ dependencies = [
|
||||
@@ -2196,20 +2195,6 @@ dependencies = [
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
@ -31,14 +31,14 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-07-05 18:14:51.104370020 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-07-05 18:15:36.584867840 -0700
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-08-26 09:03:52.773956573 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-08-26 09:05:08.595934397 -0700
|
||||
@@ -44,7 +44,7 @@ curl = "0.4.46"
|
||||
curl-sys = "0.4.72"
|
||||
filetime = "0.2.23"
|
||||
flate2 = { version = "1.0.30", default-features = false, features = ["zlib"] }
|
||||
-git2 = "0.18.3"
|
||||
+git2 = { version = "0.18.3", default-features = false, features = ["https"] }
|
||||
git2-curl = "0.19.0"
|
||||
gix = { version = "0.63.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision", "parallel", "dirwalk"] }
|
||||
-git2 = "0.19.0"
|
||||
+git2 = { version = "0.19.0", default-features = false, features = ["https"] }
|
||||
git2-curl = "0.20.0"
|
||||
gix = { version = "0.64.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
|
||||
glob = "0.3.1"
|
@ -1,7 +1,7 @@
|
||||
diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2006-07-23 18:21:28.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-07-05 18:09:20.585019493 -0700
|
||||
@@ -2189,7 +2189,6 @@ version = "0.28.0"
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-08-15 09:53:53.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-08-16 10:20:52.394575295 -0700
|
||||
@@ -2195,7 +2195,6 @@ version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
|
||||
dependencies = [
|
||||
@ -10,10 +10,10 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools
|
||||
"vcpkg",
|
||||
]
|
||||
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-07-05 18:09:20.585019493 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-07-05 18:10:13.753432408 -0700
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-08-16 10:20:52.394575295 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-08-16 10:21:50.535122479 -0700
|
||||
@@ -77,7 +77,7 @@ proptest = "1.4.0"
|
||||
pulldown-cmark = { version = "0.10.3", default-features = false, features = ["html"] }
|
||||
pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] }
|
||||
rand = "0.8.5"
|
||||
regex = "1.10.4"
|
||||
-rusqlite = { version = "0.31.0", features = ["bundled"] }
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (rustc-1.80.1-src.tar.xz) = 3c746108a86eeb734c1a8c8f63ba1a45e2cb03a8cb553395a167d07dc3ce5d8d9ea365ddd95533b6952d915069b86cad7ad218d27861e0889f8e878136bd32ab
|
||||
SHA512 (wasi-libc-wasi-sdk-22.tar.gz) = 3fcd5d6c0e09d824702165d8f1236e400b1d5e95fad14f1821d40de05340a044f0ec8a587d8478854252cc938a663aa9f854e6a5e683ef8f8349c60dc6c628ed
|
||||
SHA512 (rustc-1.81.0-src.tar.xz) = b8a837ced521d2ca2c7f228a0640da591384519e4dbc1ae768524d50616da6abbd2f7bdae3777caebc0447dac91bf76481282ce5a2264d7f30e173caa6321a51
|
||||
SHA512 (wasi-libc-3f43ea9abb24ed8d24d760989e1d87ea385f8eaa.tar.gz) = 845380a421bd002f0ccbbbf49cb16f36b4fb6401f98c9ccfa54d3a75832ca547f2823eedc3788be0a99cd582d9eb8ef5f16d828a6116ded133908ec9a7f20cf7
|
||||
|
Loading…
Reference in New Issue
Block a user