diff options
author | Ben Smith <binjimin@gmail.com> | 2018-04-06 10:40:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 10:40:13 -0700 |
commit | c1896e079897830b4e8c8f9c15dea6bd41ffc28c (patch) | |
tree | ecec63b8e0df0579179ee9b9dd7dd81a41c076ce /src | |
parent | b0193edc38f1ecc12b80c6fa408f7c0d78fb0202 (diff) | |
download | wabt-c1896e079897830b4e8c8f9c15dea6bd41ffc28c.tar.gz wabt-c1896e079897830b4e8c8f9c15dea6bd41ffc28c.tar.bz2 wabt-c1896e079897830b4e8c8f9c15dea6bd41ffc28c.zip |
Error on running wasm2c with `--enable-*` flags (#825)
None of the feature flags are currently supported. Fixes issue #823.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/wasm2c.cc | 12 |
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. |