diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-18 18:03:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-18 18:03:24 -0700 |
commit | c4bd45a8f3f3cc80f64cd78a74d014822c412c79 (patch) | |
tree | 83487f5b44ee6346a43dc7a473d5b2b18b2a171e /system | |
parent | 02bfd23069dc03e65a6501fdd8ced078341d667c (diff) |
restore EMSCRIPTEN_KEEPALIVE, needed to prevent inlining, EXPORTED_FUNCTIONS is too late for that
Diffstat (limited to 'system')
-rw-r--r-- | system/include/emscripten/emscripten.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 28e6063c..f0df8dca 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -20,14 +20,13 @@ extern "C" { /* * Forces LLVM to not dead-code-eliminate a function. Note that - * closure may still eliminate it at the JS level, for which you - * should use EXPORTED_FUNCTIONS (see settings.js). - * - * **DEPRECATED**: Use EXPORTED_FUNCTIONS instead, which will work - * with closure, asm.js, etc. For example - * -s EXPORTED_FUNCTIONS=["_main", "myfunc"] + * you still need to use EXPORTED_FUNCTIONS so it stays alive + * in JS, e.g. + * emcc -s EXPORTED_FUNCTIONS=["_main", "_myfunc"] + * and in the source file + * void EMSCRIPTEN_KEEPALIVE myfunc() {..} */ -/* #define EMSCRIPTEN_KEEPALIVE __attribute__((used)) */ +#define EMSCRIPTEN_KEEPALIVE __attribute__((used)) /* * Interface to the underlying JS engine. This function will |