summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-02-12 22:47:53 +0000
committerGitHub <noreply@github.com>2021-02-12 14:47:53 -0800
commit60eb7c8c4c76edb89e2d402769c6a3b8450ff7e8 (patch)
tree1039a1f39a96aec26ba76f2b9b7b1239f9cf44e6 /src
parentf826df6e053e0541e16cc19ded8083cf8de7c59d (diff)
downloadbinaryen-60eb7c8c4c76edb89e2d402769c6a3b8450ff7e8.tar.gz
binaryen-60eb7c8c4c76edb89e2d402769c6a3b8450ff7e8.tar.bz2
binaryen-60eb7c8c4c76edb89e2d402769c6a3b8450ff7e8.zip
Allow specifying additional features past the features section (#3564)
That is, if a wasm says "simd", it is ok to let the user specify simd as well as more features, and the the optimizer can perhaps do something with them.
Diffstat (limited to 'src')
-rw-r--r--src/tools/tool-options.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h
index 70ce4efc0..bc768c1da 100644
--- a/src/tools/tool-options.h
+++ b/src/tools/tool-options.h
@@ -148,8 +148,8 @@ struct ToolOptions : public Options {
FeatureSet optionsFeatures = FeatureSet::MVP;
optionsFeatures.enable(enabledFeatures);
optionsFeatures.disable(disabledFeatures);
- if (module.features != optionsFeatures) {
- Fatal() << "module features do not match specified features. "
+ if (!(module.features <= optionsFeatures)) {
+ Fatal() << "features section is not a subset of specified features. "
<< "Use --detect-features to resolve.";
}
}