emscripten
emscripten copied to clipboard
Question: -sMAIN_MODULE=1 and -sEXPORTED_FUNCTIONS warning no longer valid?
After #21785 was merged, only things with EMSCRIPTEN_KEEPALIVE are exported. This is problematic if we want to export symbols from libraries. It seems to work to put the library symbols that we wish to export into -sEXPORTED_FUNCTIONS= but we get a warning:
em++: warning: EXPORTED_FUNCTIONS is not valid with LINKABLE set (normally due
to SIDE_MODULE=1/MAIN_MODULE=1) since all functions are exported this mode.
To export only a subset use SIDE_MODULE=2/MAIN_MODULE=2 [-Wunused-command-line-argument]
Should this warning be removed now?
Sorry yes, I believe that warning is no longer valid and we should allow -sEXPORTED_FUNCTIONS in this case.
BTW are you referring to symbols in the main module or symbols in the side module?
Symbols in the main module.