summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-06-16 15:32:34 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-06-16 15:32:34 +0800
commit32a1d8b85b47ef68803fb7cdadf9974492373611 (patch)
tree3db293e66ad11d23233c5373d8df447a3c55f38e
parent0bde28a46eca5752f178c097047dabf73a250f5d (diff)
downloadmrust-32a1d8b85b47ef68803fb7cdadf9974492373611.tar.gz
rustc patch - Add comment-out of a size check that fails with mrustc, add comments
-rw-r--r--rustc-1.29.0-src.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/rustc-1.29.0-src.patch b/rustc-1.29.0-src.patch
index 69f831ff..bdfd15db 100644
--- a/rustc-1.29.0-src.patch
+++ b/rustc-1.29.0-src.patch
@@ -1,3 +1,4 @@
+# Add mrustc slice length intrinsics
--- src/libcore/intrinsics.rs
+++ src/libcore/intrinsics.rs
@@ -678,5 +678,9 @@
@@ -23,6 +24,7 @@
+ let rv = unsafe { ::intrinsics::mrustc_slice_len(self) };
+ rv
}
+# Static-link rustc_codegen_llvm because mrustc doesn't have dylib support
--- src/librustc_driver/Cargo.toml
+++ src/librustc_driver/Cargo.toml
@@ -39,1 +39,2 @@
@@ -38,3 +40,27 @@
let backend = match &codegen_name[..] {
+ "llvm" => rustc_codegen_llvm::__rustc_codegen_backend,
"metadata_only" => {
+# No workspace support in minicargo, patch cargo's Cargo.toml
+--- src/tools/cargo/Cargo.toml
++++ src/tools/cargo/Cargo.toml
+@@ -60,5 +60,5 @@
+ # A noop dependency that changes in the Rust repository, it's a bit of a hack.
+ # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
+ # for more information.
+-rustc-workspace-hack = "1.0.0"
++rustc-workspace-hack = { path = "../rustc-workspace-hack" }
+
+# mrustc can't represent a 24 byte version of this enum (no way of storing the
+# tag in padding)
+--- src/librustc/ty/context.rs
++++ src/librustc/ty/context.rs
+@@ -805,5 +805,5 @@
+ // Ensure our type representation does not grow
+- #[cfg(target_pointer_width = "64")]
+- assert!(mem::size_of::<ty::TypeVariants>() <= 24);
+- #[cfg(target_pointer_width = "64")]
+- assert!(mem::size_of::<ty::TyS>() <= 32);
++ //#[cfg(target_pointer_width = "64")]
++ //assert!(mem::size_of::<ty::TypeVariants>() <= 24);
++ //#[cfg(target_pointer_width = "64")]
++ //assert!(mem::size_of::<ty::TyS>() <= 32);