mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Fix lint errors when singlepass is disabled.
This commit is contained in:
parent
c9aa37fc99
commit
93f096b726
@ -860,9 +860,15 @@ fn validate(validate: Validate) {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_compiler_by_backend(backend: Backend, opts: &Run) -> Option<Box<dyn Compiler>> {
|
||||
fn get_compiler_by_backend(backend: Backend, _opts: &Run) -> Option<Box<dyn Compiler>> {
|
||||
Some(match backend {
|
||||
#[cfg(feature = "backend-singlepass")]
|
||||
Backend::Singlepass => {
|
||||
use wasmer_runtime_core::codegen::StreamingCompiler;
|
||||
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
|
||||
use wasmer_runtime_core::codegen::MiddlewareChain;
|
||||
let opts = opts.clone();
|
||||
|
||||
let opts = _opts.clone();
|
||||
let middlewares_gen = move || {
|
||||
let mut middlewares = MiddlewareChain::new();
|
||||
if opts.call_trace {
|
||||
@ -876,12 +882,6 @@ fn get_compiler_by_backend(backend: Backend, opts: &Run) -> Option<Box<dyn Compi
|
||||
middlewares
|
||||
};
|
||||
|
||||
Some(match backend {
|
||||
#[cfg(feature = "backend-singlepass")]
|
||||
Backend::Singlepass => {
|
||||
use wasmer_runtime_core::codegen::StreamingCompiler;
|
||||
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
|
||||
|
||||
let c: StreamingCompiler<SinglePassMCG, _, _, _, _> =
|
||||
StreamingCompiler::new(middlewares_gen);
|
||||
Box::new(c)
|
||||
|
Loading…
Reference in New Issue
Block a user