File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ class EvallingModuleRunner : public ModuleRunnerBase<EvallingModuleRunner> {
120120// imports, and fills the rest with fake values since those are dangerous to
121121// use. Imported globals can't be read anyway; see
122122// `EvallingModuleRunner::visitGlobalGet`.
123+ // Note: wasi_ modules have stubs generated but won't be called due to the
124+ // special handling in `CtorEvalExternalInterface::getImportedFunction`. We
125+ // still generate the stubs to ensure the link-time validation passes.
123126std::vector<std::unique_ptr<Module>> buildStubModules (Module& wasm) {
124127 std::map<Name, std::unique_ptr<Module>> modules;
125128
@@ -129,13 +132,6 @@ std::vector<std::unique_ptr<Module>> buildStubModules(Module& wasm) {
129132 Importable* importable =
130133 std::visit ([](auto * i) -> Importable* { return i; }, import );
131134
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-
139135 auto [it, inserted] = modules.try_emplace (importable->module , nullptr );
140136 if (inserted) {
141137 it->second = std::make_unique<Module>();
You can’t perform that action at this time.
0 commit comments