Skip to content

Commit

Permalink
export static base and bump for binaryen (emscripten-core#4767)
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken authored Dec 7, 2016
1 parent fdc57b6 commit 0efac40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ function JSify(data, functionsOnly) {
print('// STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n'); // comment as metadata only
}
if (BINARYEN) {
// export static base and bump, needed for linking in wasm binary's memory, dynamic linking, etc.
print('var STATIC_BUMP = {{{ STATIC_BUMP }}};');
print('Module["STATIC_BASE"] = STATIC_BASE;');
print('Module["STATIC_BUMP"] = STATIC_BUMP;');
}
}
var generated = itemsDict.function.concat(itemsDict.type).concat(itemsDict.GlobalVariableStub).concat(itemsDict.GlobalVariable);
Expand Down

0 comments on commit 0efac40

Please sign in to comment.