compiler-builtins: Remove the no-f16-f128 feature

This option was used to gate `f16` and `f128` when support across
backends and targets was inconsistent. We now have the rustc builtin cfg
`target_has_reliable{f16,f128}` which has taken over this usecase.
Remove no-f16-f128 since it is now unused and redundant.
This commit is contained in:
Trevor Gross
2026-01-11 07:00:54 -06:00
parent 08f833aa17
commit c7c5adbe64
9 changed files with 4 additions and 26 deletions
-1
View File
@@ -21,7 +21,6 @@ compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features
[features] [features]
compiler-builtins-mem = ['compiler_builtins/mem'] compiler-builtins-mem = ['compiler_builtins/mem']
compiler-builtins-c = ["compiler_builtins/c"] compiler-builtins-c = ["compiler_builtins/c"]
compiler-builtins-no-f16-f128 = ["compiler_builtins/no-f16-f128"]
# Choose algorithms that are optimized for binary size instead of runtime performance # Choose algorithms that are optimized for binary size instead of runtime performance
optimize_for_size = ["core/optimize_for_size"] optimize_for_size = ["core/optimize_for_size"]
@@ -47,10 +47,6 @@ c = ["dep:cc"]
# the generic versions on all platforms. # the generic versions on all platforms.
no-asm = [] no-asm = []
# Workaround for codegen backends which haven't yet implemented `f16` and
# `f128` support. Disabled any intrinsics which use those types.
no-f16-f128 = []
# Flag this library as the unstable compiler-builtins lib # Flag this library as the unstable compiler-builtins lib
compiler-builtins = [] compiler-builtins = []
@@ -33,7 +33,6 @@ utest-macros = { git = "https://github.com/japaric/utest" }
default = ["mangled-names"] default = ["mangled-names"]
c = ["compiler_builtins/c"] c = ["compiler_builtins/c"]
no-asm = ["compiler_builtins/no-asm"] no-asm = ["compiler_builtins/no-asm"]
no-f16-f128 = ["compiler_builtins/no-f16-f128"]
mem = ["compiler_builtins/mem"] mem = ["compiler_builtins/mem"]
mangled-names = ["compiler_builtins/mangled-names"] mangled-names = ["compiler_builtins/mangled-names"]
# Skip tests that rely on f128 symbols being available on the system # Skip tests that rely on f128 symbols being available on the system
-4
View File
@@ -36,8 +36,6 @@ else
"${test_builtins[@]}" --features c --release "${test_builtins[@]}" --features c --release
"${test_builtins[@]}" --features no-asm "${test_builtins[@]}" --features no-asm
"${test_builtins[@]}" --features no-asm --release "${test_builtins[@]}" --features no-asm --release
"${test_builtins[@]}" --features no-f16-f128
"${test_builtins[@]}" --features no-f16-f128 --release
"${test_builtins[@]}" --benches "${test_builtins[@]}" --benches
"${test_builtins[@]}" --benches --release "${test_builtins[@]}" --benches --release
@@ -63,8 +61,6 @@ symcheck+=(-- build-and-check)
"${symcheck[@]}" "$target" -- -p compiler_builtins --features c --release "${symcheck[@]}" "$target" -- -p compiler_builtins --features c --release
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm "${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm --release "${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm --release
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-f16-f128
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-f16-f128 --release
run_intrinsics_test() { run_intrinsics_test() {
build_args=(--verbose --manifest-path builtins-test-intrinsics/Cargo.toml) build_args=(--verbose --manifest-path builtins-test-intrinsics/Cargo.toml)
@@ -45,10 +45,6 @@ c = ["dep:cc"]
# the generic versions on all platforms. # the generic versions on all platforms.
no-asm = [] no-asm = []
# Workaround for codegen backends which haven't yet implemented `f16` and
# `f128` support. Disabled any intrinsics which use those types.
no-f16-f128 = []
# Flag this library as the unstable compiler-builtins lib # Flag this library as the unstable compiler-builtins lib
compiler-builtins = [] compiler-builtins = []
@@ -95,16 +95,13 @@ pub fn configure_aliases(target: &Target) {
* * https://github.com/rust-lang/rustc_codegen_cranelift/blob/c713ffab3c6e28ab4b4dd4e392330f786ea657ad/src/lib.rs#L196-L226 * * https://github.com/rust-lang/rustc_codegen_cranelift/blob/c713ffab3c6e28ab4b4dd4e392330f786ea657ad/src/lib.rs#L196-L226
*/ */
// If the feature is set, disable both of these types.
let no_f16_f128 = target.cargo_features.iter().any(|s| s == "no-f16-f128");
println!("cargo::rustc-check-cfg=cfg(f16_enabled)"); println!("cargo::rustc-check-cfg=cfg(f16_enabled)");
if target.reliable_f16 && !no_f16_f128 { if target.reliable_f16 {
println!("cargo::rustc-cfg=f16_enabled"); println!("cargo::rustc-cfg=f16_enabled");
} }
println!("cargo::rustc-check-cfg=cfg(f128_enabled)"); println!("cargo::rustc-check-cfg=cfg(f128_enabled)");
if target.reliable_f128 && !no_f16_f128 { if target.reliable_f128 {
println!("cargo::rustc-cfg=f128_enabled"); println!("cargo::rustc-cfg=f128_enabled");
} }
} }
+2 -5
View File
@@ -143,16 +143,13 @@ fn emit_f16_f128_cfg(cfg: &Config) {
/* See the compiler-builtins configure file for info about the meaning of these options */ /* See the compiler-builtins configure file for info about the meaning of these options */
// If the feature is set, disable both of these types.
let no_f16_f128 = cfg.cargo_features.iter().any(|s| s == "no-f16-f128");
println!("cargo:rustc-check-cfg=cfg(f16_enabled)"); println!("cargo:rustc-check-cfg=cfg(f16_enabled)");
if cfg.reliable_f16 && !no_f16_f128 { if cfg.reliable_f16 {
println!("cargo:rustc-cfg=f16_enabled"); println!("cargo:rustc-cfg=f16_enabled");
} }
println!("cargo:rustc-check-cfg=cfg(f128_enabled)"); println!("cargo:rustc-check-cfg=cfg(f128_enabled)");
if cfg.reliable_f128 && !no_f16_f128 { if cfg.reliable_f128 {
println!("cargo:rustc-cfg=f128_enabled"); println!("cargo:rustc-cfg=f128_enabled");
} }
} }
-1
View File
@@ -115,7 +115,6 @@ backtrace-trace-only = []
panic-unwind = ["dep:panic_unwind"] panic-unwind = ["dep:panic_unwind"]
compiler-builtins-c = ["alloc/compiler-builtins-c"] compiler-builtins-c = ["alloc/compiler-builtins-c"]
compiler-builtins-mem = ["alloc/compiler-builtins-mem"] compiler-builtins-mem = ["alloc/compiler-builtins-mem"]
compiler-builtins-no-f16-f128 = ["alloc/compiler-builtins-no-f16-f128"]
llvm-libunwind = ["unwind/llvm-libunwind"] llvm-libunwind = ["unwind/llvm-libunwind"]
system-llvm-libunwind = ["unwind/system-llvm-libunwind"] system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
-1
View File
@@ -25,7 +25,6 @@ backtrace = ["std/backtrace"]
backtrace-trace-only = ["std/backtrace-trace-only"] backtrace-trace-only = ["std/backtrace-trace-only"]
compiler-builtins-c = ["std/compiler-builtins-c"] compiler-builtins-c = ["std/compiler-builtins-c"]
compiler-builtins-mem = ["std/compiler-builtins-mem"] compiler-builtins-mem = ["std/compiler-builtins-mem"]
compiler-builtins-no-f16-f128 = ["std/compiler-builtins-no-f16-f128"]
debug_refcell = ["std/debug_refcell"] debug_refcell = ["std/debug_refcell"]
llvm-libunwind = ["std/llvm-libunwind"] llvm-libunwind = ["std/llvm-libunwind"]
system-llvm-libunwind = ["std/system-llvm-libunwind"] system-llvm-libunwind = ["std/system-llvm-libunwind"]