diff options
Diffstat (limited to 'rustc-1.29.0-src.patch')
-rw-r--r-- | rustc-1.29.0-src.patch | 26 |
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); |