Cranelift: ensure ISA level needed for SIMD is present when SIMD is enabled. (#3816)
Addresses #3809: when we are asked to create a Cranelift backend with shared flags that indicate support for SIMD, we should check that the ISA level needed for our SIMD lowerings is present.
This commit is contained in:
@@ -12,7 +12,9 @@ fn main() {
|
||||
let isa_builder = cranelift_native::builder().unwrap_or_else(|msg| {
|
||||
panic!("host machine is not supported: {}", msg);
|
||||
});
|
||||
let isa = isa_builder.finish(settings::Flags::new(flag_builder));
|
||||
let isa = isa_builder
|
||||
.finish(settings::Flags::new(flag_builder))
|
||||
.unwrap();
|
||||
let mut module = JITModule::new(JITBuilder::with_isa(isa, default_libcall_names()));
|
||||
|
||||
let mut ctx = module.make_context();
|
||||
|
||||
Reference in New Issue
Block a user