You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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. -sFOO or -s FOO. It’s highly recommended you use the notation without space.
The text was updated successfully, but these errors were encountered:
The reason that I think Sergio had trouble with spaces is because the plugin-wasm docs show this:
emccArgs
OptionalemccArgs: string[] | () => string[]
The array of additional arguments to pass to emcc. If undefined, the plugin will
use the following default set of arguments, which are tuned for (and known to work
with) Emscripten versions 2.0.34 and 3.1.46, among others.
When you pass an array of options, the spaces can cause problems if they are included in the strings due to the way args are passed to spawn. The above docs imply that you'd pass it like this (which I'm assuming how Sergio passed them):
['-s STRICT=1', ...]
But in fact you have to do the -s part as a separate string, like this:
['-s', 'STRICT=1', ...]
Or just drop the space altogether as Sergio found, and as recommended in the emcc docs:
['-sSTRICT=1', ...]
So I think we can amend the docs and the implementation of plugin-wasm to omit the space for clarity.
In discussion thread #522, @serman noted an issue with passing
-s
parameters: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
The text was updated successfully, but these errors were encountered: