Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example_emscripten: BINARYEN_TRAP_MODE is not supported #2877

Closed
podsvirov opened this issue Oct 29, 2019 · 4 comments
Closed

example_emscripten: BINARYEN_TRAP_MODE is not supported #2877

podsvirov opened this issue Oct 29, 2019 · 4 comments

Comments

@podsvirov
Copy link
Contributor

I tried to build an example_emscripten example using provided Makefile file, but got an error:

$ make
em++ -I../ -I../../ -Wall -Wformat -Os -s USE_SDL=2 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN_TRAP_MODE=clamp -s DISABLE_EXCEPTION_CATCHING=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1  -c -o main.o main.cpp
shared:ERROR: BINARYEN_TRAP_MODE is not supported by the LLVM wasm backend
make: *** [Makefile:43: main.o] Error 1

Maybe we just need to remove the -s BINARYEN_TRAP_MODE=clamp option?

Cc: @ocornut @nicolasnoble @Funto

@ocornut
Copy link
Owner

ocornut commented Oct 29, 2019

cc @floooh who may know.

@podsvirov
Copy link
Contributor Author

In #1713 PR, I am perfectly able to compile this example with only one option: -s USE_SDL=2.

@floooh
Copy link
Contributor

floooh commented Oct 29, 2019

Emscripten has switched to the "official" LLVM WASM backend a couple of days ago (with emscripten version 1.39.0), any older SDK still needs BINARYEN_TRAP_MODE flag, but when compiling with a newer SDK, the flag needs to be removed.

Here's the announcement: https://groups.google.com/forum/#!topic/emscripten-discuss/NpxVAOirSl4.

Looks like the switch didn't go completely smoothly, but with Dear ImGui I only had to remove this TRAP_MODE flag in my build system files.

PS @podsvirov: IFIR the missing flag didn't cause compilation errors or crashes in older emscripten versions, but subtle rendering errors (like missing or messed up text).

podsvirov added a commit to podsvirov/imgui that referenced this issue Oct 30, 2019
ocornut pushed a commit that referenced this issue Nov 5, 2019
ocornut added a commit that referenced this issue Nov 5, 2019
…which was removed in Emscripten 1.39.0 but required prior to 1.39.0, making life easier for absolutely no-one. (#2877, #2878) [@podsvirov]
@ocornut
Copy link
Owner

ocornut commented Nov 5, 2019

What a mess :(
Merged, thank you.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants