diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-03-02 16:23:34 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-03-02 16:23:34 -0800 |
commit | ee4b996cd331212686ecbbd03da79bf87b121512 (patch) | |
tree | 8416847d10306c9dc936f16d50da7799d3813579 | |
parent | cea99540f38100f56bd99a295ec8b1c8e2c7c7ae (diff) |
mention that EMSCRIPTEN_KEEPALIVE also exports for you
-rw-r--r-- | system/include/emscripten/emscripten.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index c36bec63..26ecdf0e 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -66,12 +66,8 @@ extern "C" { #define EM_ASM_DOUBLE_V(code) emscripten_asm_const_double(#code) /* - * Forces LLVM to not dead-code-eliminate a function. Note that - * 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() {..} + * Forces LLVM to not dead-code-eliminate a function. This also + * exports the function, as if you added it to EXPORTED_FUNCTIONS. */ #define EMSCRIPTEN_KEEPALIVE __attribute__((used)) |