-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathrustc-1.74.0-src.patch
More file actions
148 lines (135 loc) · 6.31 KB
/
rustc-1.74.0-src.patch
File metadata and controls
148 lines (135 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# mrustc doesn't have as good non-zero niche optimisation
--- compiler/rustc_parse_format/src/lib.rs
+++ compiler/rustc_parse_format/src/lib.rs
@@ -1052,3 +1052,3 @@
// Assert a reasonable size for `Piece`
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
rustc_index::static_assert_size!(Piece<'_>, 16);
--- compiler/rustc_ast/src/ast.rs
+++ compiler/rustc_ast/src/ast.rs
@@ -3167,4 +3167,4 @@
// 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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
use super::*;
--- compiler/rustc_hir/src/hir.rs
+++ compiler/rustc_hir/src/hir.rs
@@ -4078,4 +4078,4 @@
// 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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
use super::*;
--- compiler/rustc_errors/src/lib.rs
+++ compiler/rustc_errors/src/lib.rs
@@ -87,7 +87,7 @@
// (See also the comment on `DiagnosticBuilderInner`'s `diagnostic` field.)
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(PResult<'_, ()>, 16);
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Encodable, Decodable)]
--- compiler/rustc_const_eval/src/interpret/operand.rs
+++ compiler/rustc_const_eval/src/interpret/operand.rs
@@ -755,5 +755,5 @@
// 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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
use super::*;
--- compiler/rustc_const_eval/src/interpret/place.rs
+++ compiler/rustc_const_eval/src/interpret/place.rs
@@ -1091,5 +1091,5 @@
// 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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
use super::*;
--- compiler/rustc_index/src/bit_set.rs
+++ compiler/rustc_index/src/bit_set.rs
@@ -411,3 +411,3 @@
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
crate::static_assert_size!(Chunk, 16);
#
# HACK! Avoid an unsoundness in `Path` by making `Wtf8Buf` start with `Vec<u8>`
#
--- library/std/src/sys_common/wtf8.rs
+++ library/std/src/sys_common/wtf8.rs
@@ -135,3 +135,4 @@
#[derive(Eq, PartialEq, Ord, PartialOrd, Clone)]
+#[cfg_attr(rust_compiler = "mrustc", repr(C))]
pub struct Wtf8Buf {
bytes: Vec<u8>,
#
# Size checks without updated sorting
#
--- compiler/rustc_ast/src/tokenstream.rs
+++ compiler/rustc_ast/src/tokenstream.rs
@@ -739,3 +739,3 @@
// Some types are used a lot. Make sure they don't unintentionally get bigger.
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
--- compiler/rustc_middle/src/mir/consts.rs
+++ compiler/rustc_middle/src/mir/consts.rs
@@ -72,3 +72,3 @@
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
static_assert_size!(ConstValue<'_>, 24);
--- compiler/rustc_middle/src/mir/interpret/value.rs
+++ compiler/rustc_middle/src/mir/interpret/value.rs
@@ -36,3 +36,3 @@
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
static_assert_size!(Scalar, 24);
--- compiler/rustc_middle/src/mir/syntax.rs
+++ compiler/rustc_middle/src/mir/syntax.rs
@@ -1423,3 +1423,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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
--- compiler/rustc_middle/src/mir/mod.rs
+++ compiler/rustc_middle/src/mir/mod.rs
@@ -1617,3 +1617,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(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
mod size_asserts {
--- compiler/rustc_middle/src/ty/consts/kind.rs
+++ compiler/rustc_middle/src/ty/consts/kind.rs
@@ -74,3 +74,3 @@
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64", not(rust_compiler = "mrustc")))]
static_assert_size!(Expr<'_>, 24);
# MSVC Cannot handle structs larger than 32-bit, so disable this for windows with mrustc
--- vendor/hex/src/lib.rs
+++ vendor/hex/src/lib.rs
@@ -238,3 +238,3 @@
-#[cfg(target_pointer_width = "64")]
+#[cfg(all(target_pointer_width = "64", not(rust_compiler = "mrustc")))]
from_hex_array_impl! {
--- src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+++ src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
@@ -21,2 +21,3 @@
#include <cstddef>
+#include <cstdint>
#include <cstdlib>
--- src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
@@ -14,4 +14,5 @@
#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+#include <cstdint>
#include <memory>
#include <string>
--- src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+++ src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
@@ -16,4 +16,5 @@
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+#include <cstdint>
#include <memory>