Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 80d8270

Browse files
committed
Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35
Update compiler_builtins to 0.1.114 The `weak-intrinsics` feature was removed from compiler_builtins in rust-lang/compiler-builtins#598, so dropped the `compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot. In rust-lang/compiler-builtins#593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a `compiler-builtins-no-f16-f128` feature and disable it for cranelift and gcc.
2 parents a5ee5cb + ecf2963 commit 80d8270

File tree

8 files changed

+23
-9
lines changed

8 files changed

+23
-9
lines changed

‎Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,9 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
739739

740740
[[package]]
741741
name = "compiler_builtins"
742-
version = "0.1.109"
742+
version = "0.1.114"
743743
source = "registry+https://github.com/rust-lang/crates.io-index"
744-
checksum = "f11973008a8cf741fe6d22f339eba21fd0ca81e2760a769ba8243ed6c21edd7e"
744+
checksum = "eb58b199190fcfe0846f55a3b545cd6b07a34bdd5930a476ff856f3ebcc5558a"
745745
dependencies = [
746746
"cc",
747747
"rustc-std-workspace-core",

‎compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ fn build_clif_sysroot_for_triple(
271271
if channel == "release" {
272272
build_cmd.arg("--release");
273273
}
274-
build_cmd.arg("--features").arg("backtrace panic-unwind");
274+
build_cmd.arg("--features").arg("backtrace panic-unwind compiler-builtins-no-f16-f128");
275275
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
276276
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
277277
if compiler.triple.contains("apple") {

‎compiler/rustc_codegen_gcc/build_system/src/build.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,14 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
142142
rustflags.push_str(" -Csymbol-mangling-version=v0");
143143
}
144144

145-
let mut args: Vec<&dyn AsRef<OsStr>> = vec![&"cargo", &"build", &"--target", &config.target];
145+
let mut args: Vec<&dyn AsRef<OsStr>> = vec![
146+
&"cargo",
147+
&"build",
148+
&"--target",
149+
&config.target,
150+
&"--features",
151+
&"compiler-builtins-no-f16-f128",
152+
];
146153

147154
if config.no_default_features {
148155
rustflags.push_str(" -Csymbol-mangling-version=v0");

‎compiler/rustc_codegen_llvm/src/abi.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ impl LlvmType for Reg {
119119
match self.kind {
120120
RegKind::Integer => cx.type_ix(self.size.bits()),
121121
RegKind::Float => match self.size.bits() {
122+
16 => cx.type_f16(),
122123
32 => cx.type_f32(),
123124
64 => cx.type_f64(),
125+
128 => cx.type_f128(),
124126
_ => bug!("unsupported float: {:?}", self),
125127
},
126128
RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()),

‎compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ impl Reg {
238238
_ => panic!("unsupported integer: {self:?}"),
239239
},
240240
RegKind::Float => match self.size.bits() {
241+
16 => dl.f16_align.abi,
241242
32 => dl.f32_align.abi,
242243
64 => dl.f64_align.abi,
244+
128 => dl.f128_align.abi,
243245
_ => panic!("unsupported float: {self:?}"),
244246
},
245247
RegKind::Vector => dl.vector_align(self.size).abi,

‎library/alloc/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ edition = "2021"
1010

1111
[dependencies]
1212
core = { path = "../core" }
13-
compiler_builtins = { version = "0.1.40", features = ['rustc-dep-of-std'] }
13+
compiler_builtins = { version = "0.1.114", features = ['rustc-dep-of-std'] }
14+
15+
[target.'cfg(not(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")))'.dependencies]
16+
compiler_builtins = { version = "0.1.114", features = ["no-f16-f128"] }
1417

1518
[dev-dependencies]
1619
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
@@ -38,8 +41,8 @@ harness = false
3841
compiler-builtins-mem = ['compiler_builtins/mem']
3942
compiler-builtins-c = ["compiler_builtins/c"]
4043
compiler-builtins-no-asm = ["compiler_builtins/no-asm"]
44+
compiler-builtins-no-f16-f128 = ["compiler_builtins/no-f16-f128"]
4145
compiler-builtins-mangled-names = ["compiler_builtins/mangled-names"]
42-
compiler-builtins-weak-intrinsics = ["compiler_builtins/weak-intrinsics"]
4346
# Make panics and failed asserts immediately abort without formatting any message
4447
panic_immediate_abort = ["core/panic_immediate_abort"]
4548
# Choose algorithms that are optimized for binary size instead of runtime performance

‎library/std/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1717
panic_unwind = { path = "../panic_unwind", optional = true }
1818
panic_abort = { path = "../panic_abort" }
1919
core = { path = "../core", public = true }
20-
compiler_builtins = { version = "0.1.105" }
20+
compiler_builtins = { version = "0.1.114" }
2121
profiler_builtins = { path = "../profiler_builtins", optional = true }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.14", default-features = false, features = [
@@ -95,8 +95,8 @@ profiler = ["profiler_builtins"]
9595
compiler-builtins-c = ["alloc/compiler-builtins-c"]
9696
compiler-builtins-mem = ["alloc/compiler-builtins-mem"]
9797
compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm"]
98+
compiler-builtins-no-f16-f128 = ["alloc/compiler-builtins-no-f16-f128"]
9899
compiler-builtins-mangled-names = ["alloc/compiler-builtins-mangled-names"]
99-
compiler-builtins-weak-intrinsics = ["alloc/compiler-builtins-weak-intrinsics"]
100100
llvm-libunwind = ["unwind/llvm-libunwind"]
101101
system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
102102

‎library/sysroot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ backtrace = ["std/backtrace"]
1616
compiler-builtins-c = ["std/compiler-builtins-c"]
1717
compiler-builtins-mem = ["std/compiler-builtins-mem"]
1818
compiler-builtins-no-asm = ["std/compiler-builtins-no-asm"]
19+
compiler-builtins-no-f16-f128 = ["std/compiler-builtins-no-f16-f128"]
1920
compiler-builtins-mangled-names = ["std/compiler-builtins-mangled-names"]
20-
compiler-builtins-weak-intrinsics = ["std/compiler-builtins-weak-intrinsics"]
2121
llvm-libunwind = ["std/llvm-libunwind"]
2222
system-llvm-libunwind = ["std/system-llvm-libunwind"]
2323
panic-unwind = ["std/panic_unwind"]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /