Skip to content

Commit b81af35

Browse files
Don't generate stubs for WASI functions
1 parent 8c8b209 commit b81af35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tools/wasm-ctor-eval.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ std::vector<std::unique_ptr<Module>> buildStubModules(Module& wasm) {
129129
Importable* importable =
130130
std::visit([](auto* i) -> Importable* { return i; }, import);
131131

132+
// Ignore WASI functions. They are handled separately in
133+
// `getImportedFunction`.
134+
if (std::holds_alternative<Function*>(import) &&
135+
importable->module.startsWith("wasi_")) {
136+
return;
137+
}
138+
132139
auto [it, inserted] = modules.try_emplace(importable->module, nullptr);
133140
if (inserted) {
134141
it->second = std::make_unique<Module>();

0 commit comments

Comments
 (0)