aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.js')
-rw-r--r--src/compiler.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler.js b/src/compiler.js
index 9c19aeb0..d74ff7cb 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -168,6 +168,8 @@ if (SAFE_HEAP >= 2) {
EXPORTED_FUNCTIONS = set(EXPORTED_FUNCTIONS);
EXPORTED_GLOBALS = set(EXPORTED_GLOBALS);
EXCEPTION_CATCHING_WHITELIST = set(EXCEPTION_CATCHING_WHITELIST);
+
+if (DEAD_FUNCTIONS.length && ASSERTIONS) DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.push('putchar'); // for debug output
DEAD_FUNCTIONS = numberedSet(DEAD_FUNCTIONS);
RUNTIME_DEBUG = LIBRARY_DEBUG || GL_DEBUG;