diff options
| -rw-r--r-- | build_sysroot/Cargo.lock | 12 | ||||
| -rw-r--r-- | build_sysroot/Cargo.toml | 3 | ||||
| -rwxr-xr-x | build_sysroot/prepare_sysroot_src.sh | 9 | ||||
| -rw-r--r-- | crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch | 35 | ||||
| -rw-r--r-- | rust-toolchain | 2 |
5 files changed, 51 insertions, 10 deletions
diff --git a/build_sysroot/Cargo.lock b/build_sysroot/Cargo.lock index f3f29957ecd..b49518ee39a 100644 --- a/build_sysroot/Cargo.lock +++ b/build_sysroot/Cargo.lock @@ -63,9 +63,7 @@ dependencies = [ [[package]] name = "compiler_builtins" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd0782e0a7da7598164153173e5a5d4d9b1da094473c98dce0ff91406112369" +version = "0.1.39" dependencies = [ "rustc-std-workspace-core", ] @@ -130,9 +128,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "compiler_builtins", "libc", @@ -141,9 +139,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" +checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" dependencies = [ "rustc-std-workspace-core", ] diff --git a/build_sysroot/Cargo.toml b/build_sysroot/Cargo.toml index 3dbd28c286a..82516c98af2 100644 --- a/build_sysroot/Cargo.toml +++ b/build_sysroot/Cargo.toml @@ -11,12 +11,13 @@ test = { path = "./sysroot_src/library/test" } alloc_system = { path = "./alloc_system" } -compiler_builtins = { version = "=0.1.36", default-features = false } +compiler_builtins = { version = "0.1.39", default-features = false, features = ["no-asm"] } [patch.crates-io] rustc-std-workspace-core = { path = "./sysroot_src/library/rustc-std-workspace-core" } rustc-std-workspace-alloc = { path = "./sysroot_src/library/rustc-std-workspace-alloc" } rustc-std-workspace-std = { path = "./sysroot_src/library/rustc-std-workspace-std" } +compiler_builtins = { path = "./compiler-builtins" } [profile.dev] lto = "off" diff --git a/build_sysroot/prepare_sysroot_src.sh b/build_sysroot/prepare_sysroot_src.sh index 40fbaf646a2..d3b87e02ba8 100755 --- a/build_sysroot/prepare_sysroot_src.sh +++ b/build_sysroot/prepare_sysroot_src.sh @@ -29,4 +29,11 @@ git commit --no-gpg-sign -m "Patch $file" done popd -echo "Successfully prepared libcore for building" +git clone https://github.com/rust-lang/compiler-builtins.git || echo "rust-lang/compiler-builtins has already been cloned" +pushd compiler-builtins +git checkout -- . +git checkout 0.1.39 +git apply ../../crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch +popd + +echo "Successfully prepared sysroot source for building" diff --git a/crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch b/crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch new file mode 100644 index 00000000000..e14768910a9 --- /dev/null +++ b/crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch @@ -0,0 +1,35 @@ +From 7078cca3cb614e1e82da428380b4e16fc3afef46 Mon Sep 17 00:00:00 2001 +From: bjorn3 <bjorn3@users.noreply.github.com> +Date: Thu, 21 Jan 2021 14:46:36 +0100 +Subject: [PATCH] Remove rotate_left from Int + +--- + src/int/mod.rs | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/int/mod.rs b/src/int/mod.rs +index 06054c8..3bea17b 100644 +--- a/src/int/mod.rs ++++ b/src/int/mod.rs +@@ -85,7 +85,6 @@ pub trait Int: + fn wrapping_sub(self, other: Self) -> Self; + fn wrapping_shl(self, other: u32) -> Self; + fn wrapping_shr(self, other: u32) -> Self; +- fn rotate_left(self, other: u32) -> Self; + fn overflowing_add(self, other: Self) -> (Self, bool); + fn aborting_div(self, other: Self) -> Self; + fn aborting_rem(self, other: Self) -> Self; +@@ -209,10 +208,6 @@ macro_rules! int_impl_common { + <Self>::wrapping_shr(self, other) + } + +- fn rotate_left(self, other: u32) -> Self { +- <Self>::rotate_left(self, other) +- } +- + fn overflowing_add(self, other: Self) -> (Self, bool) { + <Self>::overflowing_add(self, other) + } +-- +2.26.2.7.g19db9cfb68 + diff --git a/rust-toolchain b/rust-toolchain index a2b82fb1f4f..ff530ab260e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2021-01-01 +nightly-2021-01-21 |
