mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
dev-lang/rust: fix build failure of patch 119445
Adjust the patch 119445 for Rust 1.77.0, to fix build failure started to happen with >= 1.77.0
This commit is contained in:
parent
9c1e19f2a6
commit
99c4e7f640
@ -18,33 +18,32 @@ diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.
|
||||
index e85753a351232..08e7e0b348096 100644
|
||||
--- a/src/bootstrap/src/core/builder.rs
|
||||
+++ b/src/bootstrap/src/core/builder.rs
|
||||
@@ -1812,15 +1812,19 @@ impl<'a> Builder<'a> {
|
||||
if self.config.rust_remap_debuginfo {
|
||||
// FIXME: handle vendored sources
|
||||
let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
- let mut env_var = OsString::new();
|
||||
- for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
+ if registry_src.is_dir() {
|
||||
+ let mut env_var = OsString::new();
|
||||
+ for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
+ if !env_var.is_empty() {
|
||||
+ env_var.push("\t");
|
||||
+ }
|
||||
+ env_var.push(t!(entry).path());
|
||||
+ env_var.push("=/rust/deps");
|
||||
+ }
|
||||
if !env_var.is_empty() {
|
||||
- env_var.push("\t");
|
||||
+ cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
|
||||
@@ -1805,15 +1805,19 @@ pub fn cargo(
|
||||
env_var.push("=/rust/deps");
|
||||
} else {
|
||||
let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
- for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
- if !env_var.is_empty() {
|
||||
- env_var.push("\t");
|
||||
+ if registry_src.is_dir() {
|
||||
+ for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
+ if !env_var.is_empty() {
|
||||
+ env_var.push("\t");
|
||||
+ }
|
||||
+ env_var.push(t!(entry).path());
|
||||
+ env_var.push("=/rust/deps");
|
||||
}
|
||||
- env_var.push(t!(entry).path());
|
||||
- env_var.push("=/rust/deps");
|
||||
}
|
||||
- env_var.push(t!(entry).path());
|
||||
- env_var.push("=/rust/deps");
|
||||
}
|
||||
- cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
|
||||
+ if !env_var.is_empty() {
|
||||
+ cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Enable usage of unstable features
|
||||
|
||||
From 361f32e60788bb95011092a9b2a0472d4e6d38b1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Kiernan <alex.kiernan@gmail.com>
|
||||
Date: Sat, 30 Dec 2023 15:15:40 +0000
|
@ -170,7 +170,7 @@ PATCHES=(
|
||||
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
|
||||
#"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch # Only used by upstream Gentoo, fails for 1.75
|
||||
"${FILESDIR}"/1.67.0-doc-wasm.patch
|
||||
"${FILESDIR}"/1.75.0-119445.patch
|
||||
"${FILESDIR}"/1.77.0-119445.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
Loading…
Reference in New Issue
Block a user