diff options
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/lib.rs')
-rw-r--r-- | compiler/rustc_codegen_cranelift/src/lib.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs index 629d79d50..80ce3dc93 100644 --- a/compiler/rustc_codegen_cranelift/src/lib.rs +++ b/compiler/rustc_codegen_cranelift/src/lib.rs @@ -57,6 +57,8 @@ mod compiler_builtins; mod concurrency_limiter; mod config; mod constant; +// FIXME revert back to the external crate with Cranelift 0.93 +mod cranelift_native; mod debuginfo; mod discriminant; mod driver; @@ -84,7 +86,7 @@ mod prelude { pub(crate) use rustc_middle::ty::layout::{self, LayoutOf, TyAndLayout}; pub(crate) use rustc_middle::ty::{ self, FloatTy, Instance, InstanceDef, IntTy, ParamEnv, Ty, TyCtxt, TypeAndMut, - TypeFoldable, TypeVisitable, UintTy, + TypeFoldable, TypeVisitableExt, UintTy, }; pub(crate) use rustc_target::abi::{Abi, Scalar, Size, VariantIdx}; @@ -170,6 +172,11 @@ pub struct CraneliftCodegenBackend { } impl CodegenBackend for CraneliftCodegenBackend { + fn locale_resource(&self) -> &'static str { + // FIXME(rust-lang/rust#100717) - cranelift codegen backend is not yet translated + "" + } + fn init(&self, sess: &Session) { use rustc_session::config::Lto; match sess.lto() { @@ -278,12 +285,14 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Box<dyn isa::Tar } } - if target_triple.architecture == target_lexicon::Architecture::X86_64 { + if let target_lexicon::Architecture::Aarch64(_) | target_lexicon::Architecture::X86_64 = + target_triple.architecture + { // Windows depends on stack probes to grow the committed part of the stack flags_builder.enable("enable_probestack").unwrap(); flags_builder.set("probestack_strategy", "inline").unwrap(); } else { - // __cranelift_probestack is not provided and inline stack probes are only supported on x86_64 + // __cranelift_probestack is not provided and inline stack probes are only supported on AArch64 and x86_64 flags_builder.set("enable_probestack", "false").unwrap(); } |