mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-15 11:25:22 -05:00
5cf9a03b7a
* gnu/packages/rust.scm (rust-1.39): Rename to rust-bootstrap. Update to 1.54.0. [source]: Update snippet to new version. Replace mrustc patch for 1.39.0 with patch for 1.54.0. [inputs]: Remove libssh2. Replace llvm-9 with llvm. Add gcc-9. [arguments]: Adjust custom 'setup-mrustc-sources to also create file with rust version. Adjust custom 'patch-makefiles phase to changes in mrustc's build steps. Adjust custom 'build phase to follow mrustc's build steps for rust-1.54. (rust-1.40): Replace post-bootstrapped rust-1.40 with 1.55. [arguments]: Add custom 'set-linker-locale-to-utf8 phase. Adjust custom 'build phase. Remove custom 'neuter-tidy phase. [inputs]: Replace llvm-9 with llvm. (rust-1.41, rust-1.42, rust-1.43, rust-1.44, rust-1.45, rust-1.46, rust-1.47, rust-1.48, rust-1.49, rust-1.50, rust-1.51, rust-1.52, rust-1.53): Remove variables. * gnu/packages/patches/rust-1.39.0-src.patch: Remove file. * gnu/packages/patches/rust-1.54.0-src.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register changes.
117 lines
5 KiB
Diff
117 lines
5 KiB
Diff
# mrustc is much better at enum packing, so causes almost all of these to be smaller by one pointer
|
|
--- compiler/rustc_ast/src/ast.rs
|
|
+++ compiler/rustc_ast/src/ast.rs
|
|
@@ -1075,7 +1075,7 @@ pub struct Expr {
|
|
}
|
|
|
|
// `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(Expr, 104);
|
|
|
|
impl Expr {
|
|
@@ -2779,7 +2779,7 @@ pub enum AssocItemKind {
|
|
MacCall(MacCall),
|
|
}
|
|
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(AssocItemKind, 72);
|
|
|
|
impl AssocItemKind {
|
|
@@ -2831,7 +2831,7 @@ pub enum ForeignItemKind {
|
|
MacCall(MacCall),
|
|
}
|
|
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
|
|
|
|
impl From<ForeignItemKind> for ItemKind {
|
|
--- compiler/rustc_hir/src/hir.rs
|
|
+++ compiler/rustc_hir/src/hir.rs
|
|
@@ -3050,3 +3050,3 @@
|
|
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
|
|
mod size_asserts {
|
|
--- compiler/rustc_middle/src/mir/interpret/error.rs
|
|
+++ compiler/rustc_middle/src/mir/interpret/error.rs
|
|
@@ -452,2 +452,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
static_assert_size!(InterpError<'_>, 64);
|
|
--- compiler/rustc_middle/src/mir/mod.rs
|
|
+++ compiler/rustc_middle/src/mir/mod.rs
|
|
@@ -2203,2 +2203,2 @@
|
|
-#[cfg(target_arch = "x86_64")]
|
|
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64"))]
|
|
static_assert_size!(AggregateKind<'_>, 48);
|
|
--- compiler/rustc_middle/src/thir.rs
|
|
+++ compiler/rustc_middle/src/thir.rs
|
|
@@ -147,2 +147,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(Expr<'_>, 144);
|
|
--- compiler/rustc_mir/src/interpret/place.rs
|
|
+++ compiler/rustc_mir/src/interpret/place.rs
|
|
@@ -91,2 +91,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(Place, 64);
|
|
@@ -100,2 +100,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
|
|
--- compiler/rustc_mir/src/interpret/operand.rs
|
|
+++ compiler/rustc_mir/src/interpret/operand.rs
|
|
@@ -35,2 +35,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(Immediate, 56);
|
|
@@ -90,2 +90,2 @@
|
|
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
|
|
rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
|
|
|
|
#
|
|
# Disable crc32fast's use of stdarch
|
|
#
|
|
--- vendor/crc32fast/src/specialized/mod.rs
|
|
+++ vendor/crc32fast/src/specialized/mod.rs
|
|
@@ -1,5 +1,6 @@
|
|
cfg_if! {
|
|
if #[cfg(all(
|
|
+ not(rust_compiler = "mrustc"),
|
|
crc32fast_stdarchx86,
|
|
any(target_arch = "x86", target_arch = "x86_64")
|
|
))] {
|
|
|
|
#
|
|
# Disable std_detect's detection logic (use the same logic as miri)
|
|
#
|
|
--- library/stdarch/crates/std_detect/src/detect/mod.rs
|
|
+++ library/stdarch/crates/std_detect/src/detect/mod.rs
|
|
@@ -88,2 +88,2 @@
|
|
cfg_if! {
|
|
- if #[cfg(miri)] {
|
|
+ if #[cfg(any(miri, rust_compiler = "mrustc"))] {
|
|
|
|
# PPV-Lite also needs to know that we're pretending to be miri
|
|
--- vendor/ppv-lite86/src/lib.rs
|
|
+++ vendor/ppv-lite86/src/lib.rs
|
|
@@ -12,9 +12,9 @@
|
|
-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
|
|
+#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
|
|
pub mod x86_64;
|
|
-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
|
|
+#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
|
|
use self::x86_64 as arch;
|
|
|
|
-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
|
|
+#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
|
|
pub mod generic;
|
|
-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
|
|
+#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
|
|
use self::generic as arch;
|
|
|