Pass enabled features (e.g. --enable-simd) on to WABT when running WAST files

This commit is contained in:
Andrew Brown
2019-08-14 10:39:33 -07:00
committed by Dan Gohman
parent fb1c473342
commit bb244d52d5
2 changed files with 43 additions and 11 deletions

View File

@@ -107,6 +107,11 @@ impl Context {
Self::new(Box::new(Compiler::new(isa)))
}
/// Retrieve the context features
pub fn features(&self) -> &Features {
&self.features
}
/// Construct a new instance with the given features from the current `Context`
pub fn with_features(self, features: Features) -> Self {
Self { features, ..self }