summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/wasm2c.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc
index 15981c93..58b3127d 100644
--- a/src/tools/wasm2c.cc
+++ b/src/tools/wasm2c.cc
@@ -79,6 +79,18 @@ static void ParseOptions(int argc, char** argv) {
ConvertBackslashToSlash(&s_infile);
});
parser.Parse(argc, argv);
+
+ // TODO(binji): currently wasm2c doesn't support any feature flags.
+ bool any_feature_enabled = false;
+#define WABT_FEATURE(variable, flag, help) \
+ any_feature_enabled |= s_features.variable##_enabled();
+#include "src/feature.def"
+#undef WABT_FEATURE
+
+ if (any_feature_enabled) {
+ fprintf(stderr, "wasm2c doesn't currently support any --enable-* flags.\n");
+ exit(1);
+ }
}
// TODO(binji): copied from binary-writer-spec.cc, probably should share.