diff options
author | Sam Clegg <sbc@chromium.org> | 2019-12-05 21:38:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-05 21:38:16 -0600 |
commit | 65c334d514347af34c16ba95fa416896654d6484 (patch) | |
tree | 7a88be5cedf6f564b34538e2800b7c158c2e2b48 /src | |
parent | bc46254ebae456e39ab68b55f99a67cbc2e43542 (diff) | |
download | binaryen-65c334d514347af34c16ba95fa416896654d6484.tar.gz binaryen-65c334d514347af34c16ba95fa416896654d6484.tar.bz2 binaryen-65c334d514347af34c16ba95fa416896654d6484.zip |
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 https://github.com/emscripten-core/emscripten/pull/9956
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/MinifyImportsAndExports.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/passes/MinifyImportsAndExports.cpp b/src/passes/MinifyImportsAndExports.cpp index ec582a64e..60dd2cd80 100644 --- a/src/passes/MinifyImportsAndExports.cpp +++ b/src/passes/MinifyImportsAndExports.cpp @@ -41,8 +41,6 @@ namespace wasm { -static Name WASI_UNSTABLE("wasi_unstable"); - struct MinifyImportsAndExports : public Pass { bool minifyExports; @@ -162,7 +160,7 @@ private: } }; auto processImport = [&](Importable* curr) { - if (curr->module == ENV || curr->module == WASI_UNSTABLE) { + if (curr->module == ENV || curr->module.startsWith("wasi_")) { process(curr->base); } }; |