summaryrefslogtreecommitdiff
path: root/src/wasm-linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-linker.cpp')
-rw-r--r--src/wasm-linker.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index b1160e94a..9e968598a 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -106,7 +106,12 @@ void Linker::layout() {
}
if (userMaxMemory) out.wasm.memory.max = userMaxMemory / Memory::kPageSize;
- out.wasm.memory.exportName = MEMORY;
+
+ auto memoryExport = make_unique<Export>();
+ memoryExport->name = MEMORY;
+ memoryExport->value = Name::fromInt(0);
+ memoryExport->kind = Export::Memory;
+ out.wasm.addExport(memoryExport.release());
// XXX For now, export all functions marked .globl.
for (Name name : out.globls) exportFunction(name, false);