Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable the use of the force-soft-floats feature #810

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions compiler-builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,19 @@ fn configure_libm(target: &Target) {
println!("cargo:rustc-check-cfg=cfg(intrinsics_enabled)");
println!("cargo:rustc-check-cfg=cfg(arch_enabled)");
println!("cargo:rustc-check-cfg=cfg(optimizations_enabled)");
println!("cargo:rustc-check-cfg=cfg(feature, values(\"unstable-public-internals\"))");
println!("cargo:rustc-check-cfg=cfg(feature, values(\"unstable-public-internals\", \"force-soft-floats\"))");

// Always use intrinsics
println!("cargo:rustc-cfg=intrinsics_enabled");

// Codegen backends (e.g. rustc_codegen_gcc) that implement intrinsics like simd_fsqrt by
// calling sqrt on every element of the vector ends up with an infinite recursion without this
// feature because sqrt would call simd_fsqrt, which in turn calls sqrt on those codegen
// backends.
println!("cargo:rustc-cfg=feature=\"force-soft-floats\"");

// The arch module may contain assembly.
if cfg!(feature = "no-asm") {
println!("cargo:rustc-cfg=feature=\"force-soft-floats\"");
} else {
if !cfg!(feature = "no-asm") {
println!("cargo:rustc-cfg=arch_enabled");
}

Expand Down
Loading