From 60eb7c8c4c76edb89e2d402769c6a3b8450ff7e8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 12 Feb 2021 22:47:53 +0000 Subject: 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. --- src/tools/tool-options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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."; } } -- cgit v1.2.3