googlecodelabs / web-assembly-introduction

Introduction to Web Assembly
Apache License 2.0
27 stars 9 forks source link

ONLY_MY_CODE no longer supported #17

Open dland512 opened 4 years ago

dland512 commented 4 years ago

When following the tutorial, I'm getting this:

$ emcc -s WASM=1 -s ONLY_MY_CODE=1 -s EXPORTED_FUNCTIONS="['_board_init','_board_ref','_board_step']" -o output.js *.c

shared:ERROR: Attempt to set a non-existent setting: 'ONLY_MY_CODE'
 - did you mean one of DOUBLE_MODE?
 - perhaps a typo in emcc's  -s X=Y  notation?
 - (see src/settings.js for valid values)

According to the Emscripten release notes, ONLY_MY_CODE is not longer supported:

galmok commented 4 years ago

If you provide STANDALONE_WASM, then you get different runtime errors, like wasi_snapshot_preview1 not being provided. This tutorial seriously needs to be updated, as it provides more confusion than answers.