Skip to content

Commit 39305bf

Browse files
committed
Fix x build --stage 1 std when using cg_cranelift as the default backend
Before, cg_cranelift would ICE when trying to lower f16 and f128. The library/ crates had all the infrastructure to omit using them, it just wasn't hooked up to bootstrap.
1 parent b57d93d commit 39305bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/bootstrap/src/core/build_steps/compile.rs

+5
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
523523

524524
let mut features = String::new();
525525

526+
if stage != 0 && builder.config.default_codegen_backend(target).as_deref() == Some("cranelift")
527+
{
528+
features += "compiler-builtins-no-f16-f128 ";
529+
}
530+
526531
if builder.no_std(target) == Some(true) {
527532
features += " compiler-builtins-mem";
528533
if !target.starts_with("bpf") {

0 commit comments

Comments
 (0)