diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-10 18:00:05 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-21 10:47:40 -0800 |
commit | 998e00134b593e4f503d837cddf9fd9f26980a99 (patch) | |
tree | fdd0c2ca9b6c391743ea53ea0d138fb32716bb13 | |
parent | 68fa40ad92b6aade0fbf5140fd85c3944046d890 (diff) |
by default only keep main alive
-rw-r--r-- | src/settings.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/settings.js b/src/settings.js index 77111ed5..c4d1df48 100644 --- a/src/settings.js +++ b/src/settings.js @@ -207,9 +207,10 @@ var NAMED_GLOBALS = 1; // If 1, we use global variables for globals. Otherwise var PROFILE = 0; // Enables runtime profiling. See test_profiling for a usage example. var EXPORT_ALL = 0; // If true, we export all the symbols -var EXPORTED_FUNCTIONS = ['_main', '_malloc', '_free']; // Functions that are explicitly exported, so they are guaranteed to - // be accessible outside of the generated code even after running closure compiler. - // Note the necessary prefix of "_". +var EXPORTED_FUNCTIONS = ['_main']; // 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 "_". var DEFAULT_LIBRARY_FUNCS_TO_INCLUDE = ['memcpy', 'memset', 'malloc', 'free', '$Browser']; // JS library functions (C functions implemented in JS) // that we include by default. If you want to make sure |