Run cargo build instead of cargo check for std

And use --release and respect rustflags.

Just to make doubly-sure that even in the future, a build will be done
instead of check.
This commit is contained in:
nora 2025-07-05 17:19:15 +02:00 committed by nora
parent 4969eaeb36
commit 8e9ff1e9fd

View file

@ -314,8 +314,18 @@ async fn build_target(
} }
BuildMode::Std => { BuildMode::Std => {
cmd.arg(format!("+{toolchain}")) cmd.arg(format!("+{toolchain}"))
.args(["check", "-Zbuild-std"]) .args(["build", "-Zbuild-std", "--release"])
.args(["--target", target]); .args(["--target", target]);
let extra_flags = CUSTOM_CORE_FLAGS
.iter()
.find(|flags| flags.target == target);
if let Some(extra_flags) = extra_flags {
let flags = extra_flags.flags.join(" ");
cmd.env("RUSTFLAGS", &flags);
rustflags = Some(flags);
}
} }
}; };