@@ -59,11 +59,12 @@ struct FeatureSet {
5959 CustomPageSizes = 1 << 23 ,
6060 Multibyte = 1 << 24 ,
6161 WideArithmetic = 1 << 25 ,
62+ CompactImports = 1 << 26 ,
6263 MVP = None,
6364 // Keep in sync with llvm default features:
6465 // https://github.com/llvm/llvm-project/blob/c7576cb89d6c95f03968076e902d3adfd1996577/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L153
6566 Default = SignExt | MutableGlobals,
66- All = (1 << 26 ) - 1 ,
67+ All = (1 << 27 ) - 1 ,
6768 };
6869
6970 static std::string toString (Feature f) {
@@ -120,6 +121,8 @@ struct FeatureSet {
120121 return " multibyte" ;
121122 case WideArithmetic:
122123 return " wide-arithmetic" ;
124+ case CompactImports:
125+ return " compact-imports" ;
123126 case MVP:
124127 case Default:
125128 case All:
@@ -184,6 +187,7 @@ struct FeatureSet {
184187 bool hasCustomPageSizes () const { return (features & CustomPageSizes) != 0 ; }
185188 bool hasMultibyte () const { return (features & Multibyte) != 0 ; }
186189 bool hasWideArithmetic () const { return (features & WideArithmetic) != 0 ; }
190+ bool hasCompactImports () const { return (features & CompactImports) != 0 ; }
187191 bool hasAll () const { return (features & All) != 0 ; }
188192
189193 void set (FeatureSet f, bool v = true ) {
@@ -213,6 +217,7 @@ struct FeatureSet {
213217 void setRelaxedAtomics (bool v = true ) { set (RelaxedAtomics, v); }
214218 void setMultibyte (bool v = true ) { set (Multibyte, v); }
215219 void setWideArithmetic (bool v = true ) { set (WideArithmetic, v); }
220+ void setCompactImports (bool v = true ) { set (CompactImports, v); }
216221 void setMVP () { features = MVP; }
217222 void setAll () { features = All; }
218223
0 commit comments