summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feature.cc2
-rw-r--r--src/feature.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/feature.cc b/src/feature.cc
index 989511ba..1c691216 100644
--- a/src/feature.cc
+++ b/src/feature.cc
@@ -23,7 +23,7 @@ namespace wabt {
void Features::AddOptions(OptionParser* parser) {
#define WABT_FEATURE(variable, flag, help) \
parser->AddOption("enable-" flag, help, \
- [this]() { variable##_enabled_ = true; });
+ [this]() { enable_##variable(); });
#include "src/feature.def"
#undef WABT_FEATURE
diff --git a/src/feature.h b/src/feature.h
index d2a5891c..6577b71e 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -28,7 +28,8 @@ class Features {
void AddOptions(OptionParser*);
#define WABT_FEATURE(variable, flag, help) \
- bool variable##_enabled() const { return variable##_enabled_; }
+ bool variable##_enabled() const { return variable##_enabled_; } \
+ void enable_##variable() { variable##_enabled_ = true; }
#include "src/feature.def"
#undef WABT_FEATURE