aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-24 14:01:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-24 14:01:30 -0700
commitc5732b99a69d611d3fb7fa9cd94ebb9b1f2497a5 (patch)
treefedfb16dbf333b8b4af9493fbd04e1a9ac9fb0b9
parent5f76d8e64efef639e483d15cc729075e942ca234 (diff)
auto-export malloc, needed by file packager
-rw-r--r--src/settings.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings.js b/src/settings.js
index d3abb06e..c156a40c 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -238,7 +238,8 @@ var NAMED_GLOBALS = 0; // If 1, we use global variables for globals. Otherwise
// they are referred to by a base plus an offset (called an indexed global),
// saving global variables but adding runtime overhead.
-var EXPORTED_FUNCTIONS = ['_main']; // Functions that are explicitly exported. These functions are kept alive
+var EXPORTED_FUNCTIONS = ['_main', '_malloc'];
+ // Functions that are explicitly exported. These functions are kept alive
// through LLVM dead code elimination, and also made accessible outside of
// the generated code even after running closure compiler (on "Module").
// Note the necessary prefix of "_".