diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-20 16:55:21 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-20 16:55:21 +0100 |
| commit | ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8 (patch) | |
| tree | 5e6b18b3d26ff3fdf8ed1347edd8eb3b8a234a38 /compiler/rustc_codegen_cranelift/src/lib.rs | |
| parent | c7ce69faf2a7ea16c15d922985ca27ba70da30ee (diff) | |
| parent | 370c397ec9169809e5ad270079712e0043514240 (diff) | |
| download | rust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.tar.gz rust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.zip | |
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/lib.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs index 331e3e8f5df..878b9390e13 100644 --- a/compiler/rustc_codegen_cranelift/src/lib.rs +++ b/compiler/rustc_codegen_cranelift/src/lib.rs @@ -1,5 +1,5 @@ -#![feature(rustc_private, decl_macro)] -#![cfg_attr(feature = "jit", feature(never_type, vec_into_raw_parts, once_cell))] +#![feature(rustc_private)] +// Note: please avoid adding other feature gates where possible #![warn(rust_2018_idioms)] #![warn(unused_lifetimes)] #![warn(unreachable_pub)] @@ -105,7 +105,6 @@ mod prelude { pub(crate) use crate::common::*; pub(crate) use crate::debuginfo::{DebugContext, UnwindContext}; pub(crate) use crate::pointer::Pointer; - pub(crate) use crate::trap::*; pub(crate) use crate::value_and_place::{CPlace, CPlaceInner, CValue}; } @@ -196,7 +195,7 @@ impl CodegenBackend for CraneliftCodegenBackend { CodegenMode::Aot => driver::aot::run_aot(tcx, config, metadata, need_metadata_module), CodegenMode::Jit | CodegenMode::JitLazy => { #[cfg(feature = "jit")] - let _: ! = driver::jit::run_jit(tcx, config); + driver::jit::run_jit(tcx, config); #[cfg(not(feature = "jit"))] tcx.sess.fatal("jit support was disabled when compiling rustc_codegen_cranelift"); @@ -301,7 +300,10 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Box<dyn isa::Tar } }; - isa_builder.finish(flags) + match isa_builder.finish(flags) { + Ok(target_isa) => target_isa, + Err(err) => sess.fatal(&format!("failed to build TargetIsa: {}", err)), + } } /// This is the entrypoint for a hot plugged rustc_codegen_cranelift |
