-
Notifications
You must be signed in to change notification settings - Fork 24
Description
In discussion thread #522, @serman noted an issue with passing -s parameters:
I managed to add the -S ASSERTIONS=1 to the wasm plugin:
wasmPlugin({
emccArgs: [
"-Wall", "-Os ",
"-sSTRICT=1 ",
"-sMALLOC=emmalloc",
"-sFILESYSTEM=0 ",
"-sMODULARIZE=1 ",
"-sSINGLE_FILE=1 ",
"-sEXPORT_ES6=1 ",
"-sUSE_ES6_IMPORT_META=0 ",
"-sENVIRONMENT='web,webview,worker' ",
"-sEXPORTED_FUNCTIONS='_malloc','_free','_getInitialTime','_getFinalTime','_getSaveper','_setLookup','_runModelWithBuffers']",
"-sEXPORTED_RUNTIME_METHODS=['cwrap']",
"-sASSERTIONS=1"] }),
(note: I recommend including an example of this in the documentation since I didn't know that -s params don't have a space between "-s XXXXPARAMXXX" I can add it if you want)
It's interesting that in many of the Emscripten error messages, they show -s arguments with a space, and historically in SDE we have used a space as well, but it looks like the Emscripten documentation was amended at some point to recommend NOT including a space:
https://emscripten.org/docs/tools_reference/emcc.html
Options can be specified as a single argument with or without a space between the -s and option name. e.g.
-sFOOor-s FOO. It’s highly recommended you use the notation without space.