diff options
Diffstat (limited to 'system/include/emscripten.h')
-rw-r--r-- | system/include/emscripten.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/system/include/emscripten.h b/system/include/emscripten.h index 70524835..e265e8fd 100644 --- a/system/include/emscripten.h +++ b/system/include/emscripten.h @@ -12,6 +12,16 @@ extern "C" { #endif /* + * 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). + * + * Example usage: + * void EMSCRIPTEN_KEEPALIVE my_function() { .. } + */ +#define EMSCRIPTEN_KEEPALIVE __attribute__((used)) + +/* * Interface to the underlying JS engine. This function will * eval() the given script. */ |