aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.js')
-rw-r--r--src/compiler.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler.js b/src/compiler.js
index d74ff7cb..313fd5f7 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -169,7 +169,9 @@ 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.forEach(function(dead) {
+ DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.push(dead.substr(1));
+});
DEAD_FUNCTIONS = numberedSet(DEAD_FUNCTIONS);
RUNTIME_DEBUG = LIBRARY_DEBUG || GL_DEBUG;