Skip to content

Commit 65c334d

Browse files
authored
Include in minification all imports from modules starting with wasi_ (#2509)
This allows us to support not just wasi_unstable but also the new wasi_snapshot_preview1 and beyond. See emscripten-core/emscripten#9956
1 parent bc46254 commit 65c334d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/passes/MinifyImportsAndExports.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141

4242
namespace wasm {
4343

44-
static Name WASI_UNSTABLE("wasi_unstable");
45-
4644
struct MinifyImportsAndExports : public Pass {
4745
bool minifyExports;
4846

@@ -162,7 +160,7 @@ struct MinifyImportsAndExports : public Pass {
162160
}
163161
};
164162
auto processImport = [&](Importable* curr) {
165-
if (curr->module == ENV || curr->module == WASI_UNSTABLE) {
163+
if (curr->module == ENV || curr->module.startsWith("wasi_")) {
166164
process(curr->base);
167165
}
168166
};

0 commit comments

Comments
 (0)