From fa079068a4edc31b3f8969841245f060a85658ed Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Sat, 26 Oct 2024 18:36:53 -0500 Subject: [PATCH 1/3] Update compiler-builtins to 0.1.136 This includes: * The license change https://github.com/rust-lang/compiler-builtins/pull/717 * The `libm` submodule update, which also has a license change https://github.com/rust-lang/libm/pull/317 * Re-enabling `math` on i686 UEFI https://github.com/rust-lang/compiler-builtins/pull/715 --- library/Cargo.lock | 4 ++-- library/alloc/Cargo.toml | 2 +- library/std/Cargo.toml | 2 +- src/tools/tidy/src/deps.rs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/library/Cargo.lock b/library/Cargo.lock index db60a48408157..5defd2950e8ea 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "compiler_builtins" -version = "0.1.134" +version = "0.1.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f743e6f7410a78c261505c729f389583de40eec62332cc8cdf2c8b9bf73049a" +checksum = "33ccee9dd499d7ada4c81533382ce87e88c52b0676c7320b2e617d29e1bb3a3f" dependencies = [ "cc", "rustc-std-workspace-core", diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml index 6301ade2775dc..a9c375b62bda9 100644 --- a/library/alloc/Cargo.toml +++ b/library/alloc/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] core = { path = "../core" } -compiler_builtins = { version = "0.1.134", features = ['rustc-dep-of-std'] } +compiler_builtins = { version = "0.1.136", features = ['rustc-dep-of-std'] } [dev-dependencies] rand = { version = "0.8.5", default-features = false, features = ["alloc"] } diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index bfb9df7d78145..9b66fc8f92147 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -17,7 +17,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] } panic_unwind = { path = "../panic_unwind", optional = true } panic_abort = { path = "../panic_abort" } core = { path = "../core", public = true } -compiler_builtins = { version = "0.1.134" } +compiler_builtins = { version = "0.1.136" } unwind = { path = "../unwind" } hashbrown = { version = "0.15", default-features = false, features = [ 'rustc-dep-of-std', diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 5163f039a2329..630838d46a253 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -24,6 +24,7 @@ const LICENSES: &[&str] = &[ "BSD-2-Clause OR Apache-2.0 OR MIT", // zerocopy "ISC", "MIT / Apache-2.0", + "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)", // compiler-builtins "MIT OR Apache-2.0 OR LGPL-2.1-or-later", // r-efi, r-efi-alloc "MIT OR Apache-2.0 OR Zlib", // tinyvec_macros "MIT OR Apache-2.0", From b868454fdcf87311ca2d89b2f6c1450ecba277d2 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 31 Oct 2024 19:11:25 -0500 Subject: [PATCH 2/3] Update `compiler_builtins` to 0.1.137 and pin it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates to a new version of builtins that includes [1], which was the last blocker to us enabling `f128` tests on all platforms 🎉. With this update, also change to pinning the version with `=` rather than using the default carat versioning. This is meant to ensure that `compiler-builtins` does not get updated as part of the weekly `Cargo.lock` update, since updates to this crate need to be intentional: changes to rust-lang/rust and rust-lang/compiler-builtins sometimes need to be kept in lockstep, unlike most dependencies, and sometimes these updates can be problematic. [1]: https://github.com/rust-lang/compiler-builtins/pull/624 --- library/Cargo.lock | 4 ++-- library/alloc/Cargo.toml | 2 +- library/std/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Cargo.lock b/library/Cargo.lock index 5defd2950e8ea..cb7b3a8e59bed 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "compiler_builtins" -version = "0.1.136" +version = "0.1.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ccee9dd499d7ada4c81533382ce87e88c52b0676c7320b2e617d29e1bb3a3f" +checksum = "12ca24dd460d0e3d28cc55e2d6a1bfe84e03577bc9e43b2d96d86ccd26ab7b91" dependencies = [ "cc", "rustc-std-workspace-core", diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml index a9c375b62bda9..9e002081cd803 100644 --- a/library/alloc/Cargo.toml +++ b/library/alloc/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] core = { path = "../core" } -compiler_builtins = { version = "0.1.136", features = ['rustc-dep-of-std'] } +compiler_builtins = { version = "=0.1.137", features = ['rustc-dep-of-std'] } [dev-dependencies] rand = { version = "0.8.5", default-features = false, features = ["alloc"] } diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 9b66fc8f92147..caca38dbacc9a 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -17,7 +17,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] } panic_unwind = { path = "../panic_unwind", optional = true } panic_abort = { path = "../panic_abort" } core = { path = "../core", public = true } -compiler_builtins = { version = "0.1.136" } +compiler_builtins = { version = "=0.1.137" } unwind = { path = "../unwind" } hashbrown = { version = "0.15", default-features = false, features = [ 'rustc-dep-of-std', From 15075bf74a7a7112db3422634f4f3a0974dcc02f Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 31 Oct 2024 19:29:40 -0500 Subject: [PATCH 3/3] =?UTF-8?q?Enable=20`f128`=20tests=20on=20all=20non-bu?= =?UTF-8?q?ggy=20platforms=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the `compiler-builtins` update to 0.1.137 [1], we now provide symbols necessary to work with `f128` everywhere. This means that we are no longer restricted to 64-bit linux, and can enable tests by default. There are still a handful of platforms that need to remain disabled because of bugs. Math support is still off by default since those symbols are not yet available. [1]: https://github.com/rust-lang/rust/pull/132433 --- library/std/build.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/std/build.rs b/library/std/build.rs index 032326556bd5b..dfa12b76931e6 100644 --- a/library/std/build.rs +++ b/library/std/build.rs @@ -131,10 +131,10 @@ fn main() { ("sparc", _) => false, // MinGW ABI bugs ("x86_64", "windows") if target_env == "gnu" && target_abi != "llvm" => false, - // 64-bit Linux is about the only platform to have f128 symbols by default - (_, "linux") if target_pointer_width == 64 => true, - // Almost all OSs are missing symbol. compiler-builtins will have to add them. - _ => false, + // There are no known problems on other platforms, so the only requirement is that symbols + // are available. `compiler-builtins` provides all symbols required for core `f128` + // support, so this should work for everything else. + _ => true, }; // Configure platforms that have reliable basics but may have unreliable math.