mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 04:38:25 +00:00
Improved feature-generation to be compiler-based
This commit is contained in:
@@ -7,6 +7,7 @@ use inkwell::OptimizationLevel;
|
||||
use itertools::Itertools;
|
||||
use std::sync::Arc;
|
||||
use target_lexicon::Architecture;
|
||||
use wasm_common::Features;
|
||||
use wasm_common::{FunctionType, LocalFunctionIndex};
|
||||
use wasmer_compiler::{Compiler, CompilerConfig, FunctionMiddlewareGenerator, Target, Triple};
|
||||
|
||||
@@ -189,6 +190,11 @@ impl CompilerConfig for LLVM {
|
||||
Box::new(LLVMCompiler::new(&self))
|
||||
}
|
||||
|
||||
/// Gets the default features for this compiler in the given target
|
||||
fn default_features_for_target(&self, _target: &Target) -> Features {
|
||||
Features::default()
|
||||
}
|
||||
|
||||
/// Pushes a middleware onto the back of the middleware chain.
|
||||
fn push_middleware(&mut self, middleware: Arc<dyn FunctionMiddlewareGenerator>) {
|
||||
self.middlewares.push(middleware);
|
||||
|
||||
Reference in New Issue
Block a user