fix: patch symlink_file method body for rustc 1.93 s390x cross-compile
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Oleks
2026-03-16 00:21:11 +02:00
parent 8e628dad9c
commit cfa685cf91
+3 -3
View File
@@ -95,12 +95,12 @@
};
})
# Rustc bootstrap: symlink_file panics with "File exists" during
# s390x cross-compilation (lib.rs:1823 calls t!(self.symlink_file(link, dst))).
# Patch symlink_file in lib.rs to remove existing destination first.
# s390x cross-compilation. Multiple call sites use t!(symlink_file(...)).
# Patch the symlink_file method body to remove existing dest first.
(final: prev: {
rustc = prev.rustc.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
sed -i 's|if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref())|if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref())|' src/bootstrap/src/lib.rs
sed -i 's|if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) }|if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) }|' src/bootstrap/src/lib.rs
'';
});
})