Skip to content

Commit d0c7277

Browse files
authored
Merge pull request #1542 from flatcar/rust-1.75.0-main
Upgrade dev-lang/rust and virtual/rust in main from 1.74.1 to 1.75.0
2 parents 4c41842 + bab1cef commit d0c7277

File tree

7 files changed

+122
-35
lines changed

7 files changed

+122
-35
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Rust ([1.75.0](https://github.com/rust-lang/rust/releases/tag/1.75.0))

sdk_container/src/third_party/coreos-overlay/dev-lang/rust/Manifest

+30-30
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
From a4132f6d092b781b742679d2229c1c69f6ad7b16 Mon Sep 17 00:00:00 2001
2+
From: Alex Kiernan <[email protected]>
3+
Date: Sat, 30 Dec 2023 15:13:27 +0000
4+
Subject: [PATCH 1/2] Handle non-existent/empty <CARGO_HOME>/registry/src
5+
6+
If remap-debuginfo is set but cargo isn't vendored into
7+
.cargo/registry/src, don't panic:
8+
9+
| thread 'main' panicked at src/core/builder.rs:1795:26:
10+
| std::fs::read_dir(registry_src) failed with No such file or directory (os error 2)
11+
12+
Signed-off-by: Alex Kiernan <[email protected]>
13+
---
14+
src/bootstrap/src/core/builder.rs | 16 ++++++++++------
15+
1 file changed, 10 insertions(+), 6 deletions(-)
16+
17+
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
18+
index e85753a351232..08e7e0b348096 100644
19+
--- a/src/bootstrap/src/core/builder.rs
20+
+++ b/src/bootstrap/src/core/builder.rs
21+
@@ -1812,15 +1812,19 @@ impl<'a> Builder<'a> {
22+
if self.config.rust_remap_debuginfo {
23+
// FIXME: handle vendored sources
24+
let registry_src = t!(home::cargo_home()).join("registry").join("src");
25+
- let mut env_var = OsString::new();
26+
- for entry in t!(std::fs::read_dir(registry_src)) {
27+
+ if registry_src.is_dir() {
28+
+ let mut env_var = OsString::new();
29+
+ for entry in t!(std::fs::read_dir(registry_src)) {
30+
+ if !env_var.is_empty() {
31+
+ env_var.push("\t");
32+
+ }
33+
+ env_var.push(t!(entry).path());
34+
+ env_var.push("=/rust/deps");
35+
+ }
36+
if !env_var.is_empty() {
37+
- env_var.push("\t");
38+
+ cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
39+
}
40+
- env_var.push(t!(entry).path());
41+
- env_var.push("=/rust/deps");
42+
}
43+
- cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
44+
}
45+
46+
// Enable usage of unstable features
47+
48+
From 361f32e60788bb95011092a9b2a0472d4e6d38b1 Mon Sep 17 00:00:00 2001
49+
From: Alex Kiernan <[email protected]>
50+
Date: Sat, 30 Dec 2023 15:15:40 +0000
51+
Subject: [PATCH 2/2] Ignore blank
52+
RUSTC_DEBUGINFO_MAP/RUSTC_CARGO_REGISTRY_SRC_TO_REMAP
53+
54+
If RUSTC_DEBUGINFO_MAP or RUSTC_CARGO_REGISTRY_SRC_TO_REMAP are empty,
55+
avoid inserting `--remap-path-prefix` with no associated argument.
56+
57+
Signed-off-by: Alex Kiernan <[email protected]>
58+
---
59+
src/bootstrap/src/bin/rustc.rs | 8 ++++++--
60+
1 file changed, 6 insertions(+), 2 deletions(-)
61+
62+
diff --git a/src/bootstrap/src/bin/rustc.rs b/src/bootstrap/src/bin/rustc.rs
63+
index 38c55b2034496..a9dd687b75653 100644
64+
--- a/src/bootstrap/src/bin/rustc.rs
65+
+++ b/src/bootstrap/src/bin/rustc.rs
66+
@@ -161,13 +161,17 @@ fn main() {
67+
}
68+
69+
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
70+
- cmd.arg("--remap-path-prefix").arg(&map);
71+
+ if !map.is_empty() {
72+
+ cmd.arg("--remap-path-prefix").arg(&map);
73+
+ }
74+
}
75+
// The remap flags for Cargo registry sources need to be passed after the remapping for the
76+
// Rust source code directory, to handle cases when $CARGO_HOME is inside the source directory.
77+
if let Ok(maps) = env::var("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP") {
78+
for map in maps.split('\t') {
79+
- cmd.arg("--remap-path-prefix").arg(map);
80+
+ if !map.is_empty() {
81+
+ cmd.arg("--remap-path-prefix").arg(map);
82+
+ }
83+
}
84+
}
85+

sdk_container/src/third_party/coreos-overlay/dev-lang/rust/rust-1.74.1.ebuild renamed to sdk_container/src/third_party/coreos-overlay/dev-lang/rust/rust-1.75.0.ebuild

+2-1
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
168168
PATCHES=(
169169
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
170170
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
171-
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
171+
#"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch # Only used by upstream Gentoo, fails for 1.75
172172
"${FILESDIR}"/1.67.0-doc-wasm.patch
173+
"${FILESDIR}"/1.75.0-119445.patch
173174
)
174175

175176
S="${WORKDIR}/${MY_P}-src"

sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
=dev-lang/python-3.11.6 ~amd64
4646

4747
# Accept unstable host Rust compilers.
48-
=dev-lang/rust-1.74.1 ~amd64 ~arm64
48+
=dev-lang/rust-1.75.0 ~amd64 ~arm64
4949

5050
# Needed by arm64-native SDK.
5151
=dev-lang/yasm-1.3.0-r1 ~arm64
@@ -93,4 +93,4 @@
9393
=sys-process/procps-4.0.4 ~amd64
9494

9595
# Accept unstable host Rust compilers.
96-
=virtual/rust-1.74.1 ~amd64 ~arm64
96+
=virtual/rust-1.75.0 ~amd64 ~arm64

sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.unmask

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
# Overwrite portage-stable mask. We haven't seen LLVM related problems
1313
# with rust so far, so keep using 1.70.0.
14-
~dev-lang/rust-1.74.1
15-
~virtual/rust-1.74.1
14+
~dev-lang/rust-1.75.0
15+
~virtual/rust-1.75.0
1616

1717
# portage-stable masked catalyst-3, and has not provided a stable way to
1818
# update to catalyst-4 so overriding the change for now to use catalyst-3

0 commit comments

Comments
 (0)