add the feature flag for llvm backend

This commit is contained in:
Mackenzie Clark
2019-03-12 11:04:52 -07:00
parent 76531b4fcb
commit f7f4fbf08a
5 changed files with 11 additions and 4 deletions

View File

@ -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)?;