Skip to content

Commit 3d15579

Browse files
xtask: Fully drop support for build-std
This requires an MSRV bump to 2022-11-22. (The build-std targets were actually added in 2022-11-10, but there were some bugs in the dist at that time that cause linker errors on i686.)
1 parent 2036bed commit 3d15579

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

.github/workflows/msrv_toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
# Oldest nightly that currently works with `cargo xtask build`.
3-
channel = "nightly-2022-08-08"
4-
components = ["rust-src"]
3+
channel = "nightly-2022-11-22"
4+
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]

xtask/src/cargo.rs

-20
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,6 @@ pub fn fix_nested_cargo_env(cmd: &mut Command) {
160160
cmd.env("PATH", sanitized_path(orig_path));
161161
}
162162

163-
/// Check if the three UEFI targets are installed via rustup (only
164-
/// supported since nightly-2022-11-10).
165-
fn is_target_installed(target: &str) -> Result<bool> {
166-
let output = Command::new("rustup")
167-
.args(["target", "list", "--installed"])
168-
.output()?;
169-
if !output.status.success() {
170-
bail!("failed to get installed targets");
171-
}
172-
let stdout = String::from_utf8(output.stdout)?;
173-
Ok(stdout.lines().any(|x| x == target))
174-
}
175-
176163
#[derive(Debug)]
177164
pub struct Cargo {
178165
pub action: CargoAction,
@@ -232,13 +219,6 @@ impl Cargo {
232219

233220
if let Some(target) = self.target {
234221
cmd.args(["--target", target.as_triple()]);
235-
236-
// If the target is not installed, use build-std. Keep this
237-
// around until our minimum-supported nightly version is at
238-
// least 2022-11-10.
239-
if !is_target_installed(target.as_triple())? {
240-
cmd.args(["-Zbuild-std=core,alloc"]);
241-
}
242222
}
243223

244224
if self.packages.is_empty() {

0 commit comments

Comments
 (0)