Skip to content

Commit 1127461

Browse files
committedDec 6, 2019
Include in minification all imports from modules starting with wasi_
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 c6f5f16 commit 1127461

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/passes/MinifyImportsAndExports.cpp

+1-3
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)