about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/allocator.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-29 11:20:25 +0000
committerbors <bors@rust-lang.org>2021-03-29 11:20:25 +0000
commit3aedcf06b73fc36feeebca3d579e1d2a6c40acc5 (patch)
tree9fe76465f17b495d2679b2e9aece5ec078a771c3 /compiler/rustc_codegen_cranelift/src/allocator.rs
parent40334da7a6cc0602aa16252cf8f78dc0beb48159 (diff)
parent5444b46234627289c6dded36413be3a5fa6afdbd (diff)
downloadrust-3aedcf06b73fc36feeebca3d579e1d2a6c40acc5.tar.gz
rust-3aedcf06b73fc36feeebca3d579e1d2a6c40acc5.zip
Auto merge of #83637 - bjorn3:sync_cg_clif-2021-03-29, r=bjorn3
Sync rustc_codegen_cranelift

The main highlight of this sync is support for cross-compiling to Windows using MinGW. Native compilation with MinGW would also work I think, but using the MSVC toolchain is not yet supported as PE TLS is not yet implemented. Another nice improvement is that crate metadata is now loaded using mmap instead of by reading files. This improves compilation time a bit.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/allocator.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/allocator.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/allocator.rs b/compiler/rustc_codegen_cranelift/src/allocator.rs
index efb64233ef2..f60645a9f97 100644
--- a/compiler/rustc_codegen_cranelift/src/allocator.rs
+++ b/compiler/rustc_codegen_cranelift/src/allocator.rs
@@ -3,6 +3,7 @@
 
 use crate::prelude::*;
 
+use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
 use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
 use rustc_span::symbol::sym;
 
@@ -92,7 +93,7 @@ fn codegen_inner(
             bcx.finalize();
         }
         module
-            .define_function(func_id, &mut ctx, &mut cranelift_codegen::binemit::NullTrapSink {})
+            .define_function(func_id, &mut ctx, &mut NullTrapSink {}, &mut NullStackMapSink {})
             .unwrap();
         unwind_context.add_function(func_id, &ctx, module.isa());
     }
@@ -132,7 +133,7 @@ fn codegen_inner(
         bcx.finalize();
     }
     module
-        .define_function(func_id, &mut ctx, &mut cranelift_codegen::binemit::NullTrapSink {})
+        .define_function(func_id, &mut ctx, &mut NullTrapSink {}, &mut NullStackMapSink {})
         .unwrap();
     unwind_context.add_function(func_id, &ctx, module.isa());
 }