mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-21 20:51:32 +00:00
add the feature flag for llvm backend
This commit is contained in:
@ -39,7 +39,7 @@ glob = "0.2.11"
|
||||
|
||||
[features]
|
||||
default = ["fast-tests"]
|
||||
vfs = ["wasmer-runtime-abi", "wasmer-runtime-core/vfs", "wasmer-emscripten/vfs", "wasmer-clif-backend/vfs"]
|
||||
vfs = ["wasmer-runtime-abi", "wasmer-runtime-core/vfs", "wasmer-emscripten/vfs", "wasmer-clif-backend/vfs", "wasmer-llvm-backend/vfs"]
|
||||
debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
||||
# This feature will allow cargo test to run much faster
|
||||
fast-tests = []
|
||||
|
2
Makefile
2
Makefile
@ -28,7 +28,7 @@ integration-tests: release
|
||||
|
||||
lint:
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --all
|
||||
cargo clippy # --all
|
||||
|
||||
precommit: lint test
|
||||
|
||||
|
@ -32,4 +32,4 @@ glob = "0.2.11"
|
||||
[features]
|
||||
clif = []
|
||||
llvm = []
|
||||
vfs = ["wasmer-runtime-core/vfs", "wasmer-clif-backend/vfs", "wasmer-runtime-abi"]
|
||||
vfs = ["wasmer-runtime-core/vfs", "wasmer-clif-backend/vfs", "wasmer-llvm-backend/vfs", "wasmer-runtime-abi"]
|
||||
|
@ -28,3 +28,4 @@ wabt = "0.7.4"
|
||||
[features]
|
||||
debug = ["wasmer-runtime-core/debug"]
|
||||
disasm = ["capstone"]
|
||||
vfs = ["wasmer-runtime-core/vfs"]
|
||||
|
@ -18,6 +18,9 @@ use wasmparser::{
|
||||
SectionCode, Type as WpType,
|
||||
};
|
||||
|
||||
#[cfg(feature = "vfs")]
|
||||
use hashbrown::HashMap;
|
||||
|
||||
pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), BinaryReaderError> {
|
||||
let mut info = ModuleInfo {
|
||||
memories: Map::new(),
|
||||
@ -42,6 +45,9 @@ pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), Binar
|
||||
|
||||
namespace_table: StringTable::new(),
|
||||
name_table: StringTable::new(),
|
||||
|
||||
#[cfg(feature = "vfs")]
|
||||
custom_sections: HashMap::new(),
|
||||
};
|
||||
|
||||
let mut reader = ModuleReader::new(wasm)?;
|
||||
|
Reference in New Issue
Block a user