summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/tool-options.h4
-rw-r--r--src/wasm-features.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h
index 14cbf4aba..eb5212c84 100644
--- a/src/tools/tool-options.h
+++ b/src/tools/tool-options.h
@@ -205,8 +205,8 @@ struct ToolOptions : public Options {
}
private:
- FeatureSet enabledFeatures = FeatureSet::MVP;
- FeatureSet disabledFeatures = FeatureSet::MVP;
+ FeatureSet enabledFeatures = FeatureSet::Default;
+ FeatureSet disabledFeatures = FeatureSet::None;
};
} // namespace wasm
diff --git a/src/wasm-features.h b/src/wasm-features.h
index 2ceb9796b..881868901 100644
--- a/src/wasm-features.h
+++ b/src/wasm-features.h
@@ -27,7 +27,7 @@ namespace wasm {
struct FeatureSet {
enum Feature : uint32_t {
- MVP = 0,
+ None = 0,
Atomics = 1 << 0,
MutableGlobals = 1 << 1,
TruncSat = 1 << 2,
@@ -46,6 +46,10 @@ struct FeatureSet {
ExtendedConst = 1 << 14,
Strings = 1 << 15,
MultiMemories = 1 << 16,
+ MVP = None,
+ // Keep in sync with llvm default features:
+ // https://github.com/llvm/llvm-project/blob/c7576cb89d6c95f03968076e902d3adfd1996577/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L153
+ Default = SignExt | MutableGlobals,
// GCNNLocals are opt-in: merely asking for "All" does not apply them. To
// get all possible values use AllPossible. See setAll() below for more
// details.
@@ -109,7 +113,7 @@ struct FeatureSet {
return ret;
}
- FeatureSet() : features(MVP) {}
+ FeatureSet() : features(None) {}
FeatureSet(uint32_t features) : features(features) {}
operator uint32_t() const { return features; }