diff options
Diffstat (limited to 'src/pass.h')
-rw-r--r-- | src/pass.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pass.h b/src/pass.h index 20384241c..236878a1a 100644 --- a/src/pass.h +++ b/src/pass.h @@ -62,6 +62,7 @@ struct PassOptions { int shrinkLevel = 0; // 0, 1, 2 correspond to -O0, -Os, -Oz bool ignoreImplicitTraps = false; // optimize assuming things like div by 0, bad load/store, will not trap bool debugInfo = false; // whether to try to preserve debug info through, which are special calls + FeatureSet features = Feature::MVP; // Which wasm features to accept, and be allowed to use }; // @@ -87,6 +88,9 @@ struct PassRunner { void setValidateGlobally(bool validate) { options.validateGlobally = validate; } + void setFeatures(FeatureSet features) { + options.features = features; + } void add(std::string passName) { auto pass = PassRegistry::get()->createPass(passName); |