Created
September 12, 2017 13:48
-
-
Save lrz/5a27a1466551a153ec944b6f26d01187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp | |
index 7d1c35d..ddbac05 100644 | |
--- a/src/wasm-linker.cpp | |
+++ b/src/wasm-linker.cpp | |
@@ -332,6 +332,7 @@ bool Linker::linkArchive(Archive& archive) { | |
return true; | |
} | |
+#if !defined(NO_EMSCRIPTEN_GLUE) | |
void Linker::emscriptenGlue(std::ostream& o) { | |
if (debug) { | |
WasmPrinter::printModule(&out.wasm, std::cerr); | |
@@ -347,6 +348,7 @@ void Linker::emscriptenGlue(std::ostream& o) { | |
auto staticBump = nextStatic - globalBase; | |
emscripten::generateEmscriptenMetadata(o, out.wasm, segmentsByAddress, staticBump, out.initializerFunctions); | |
} | |
+#endif | |
void Linker::ensureTableSegment() { | |
if (out.wasm.table.segments.size() == 0) { | |
diff --git a/src/wasm-linker.h b/src/wasm-linker.h | |
index 2129f4f..9962f4e 100644 | |
--- a/src/wasm-linker.h | |
+++ b/src/wasm-linker.h | |
@@ -248,7 +248,9 @@ class Linker { | |
// Support for emscripten integration: generates dyncall thunks, emits | |
// metadata for asmConsts, staticBump and initializer functions. | |
+#if !defined(NO_EMSCRIPTEN_GLUE) | |
void emscriptenGlue(std::ostream& o); | |
+#endif | |
// Add an object to the link by constructing it in-place with a builder. | |
// Returns false if an error occurred. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment