emscripten-core/emscripten

preamble.js: emcc-generated functions have length 0

Open

#14.554 aperta il 29 giu 2021

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)C++ (3519 fork)batch import
help wanted

Metriche repository

Star
 (27.361 star)
Metriche merge PR
 (Merge medio 19g 10h) (147 PR mergiate in 30 g)

Descrizione

echo >test.c 'int foo (int x) { return 0; }
' &&
echo >test.js 'assert (
_foo .length == 01,
[ '\''foo has'\'',
_foo .length,
'\''arguments'\''
] .join ('\'' '\''
))' &&
emcc test.c --post-js test.js -sEXPORTED_FUNCTIONS=_foo &&
node a.out
Assertion failed: foo has 0 arguments

Guida contributor