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
Full link command and output with -v appended:
Even for runtime issues it helps a lot if you can include the full link command.
Adding -v to the link command will show all of the sub-commands run which
can help us diagnose your issue.
This is the output of both build and link as I do it all in a single step:
I have discovered that my application is not working on iOS 14.3 (and lower) - and it should.
This is the error I am seeing:
The issue started to happen when the emscripten toolchain was bumped from version 3.1.23 to 3.1.34. I have done different builds with different Emscripten versions and this only happens starting at 3.1.26. Checking the release notes in the changelog I see this:
Inline with the recent changes to llvm and binaryen, emscripten will now, by default, enable the sign-extension and mutable-globals WebAssembly proposals. In order to do so the default minimum safari version (MIN_SAFARI_VERSION) was updated from 12.0 to 14.1, and support for the old EdgeHTML engine (MIN_EDGE_VERSION) was removed by default. If you want to continue to support these older engines you can use these settings (-sMIN_SAFARI_VERSION=120000 and/or -sMIN_EDGE_VERSION=44) to revert to the previous defaults, which will result in the new proposals being disabled. Note that in order to avoid support for the sign-extension emscripten uses a binaryen pass, so targeting older browsers requires the running of wasm-opt and is therefore incompatible with ERROR_ON_WASM_CHANGES_AFTER_LINK (i.e. fast linking). (Bump min browser versions such they all support llvm default features #17690)
This explicitly says that iOS min version was changed from 12.0.0 to 14.1. I am testing with iOS 14.3, so in theory I should not be affected by this. But anyway I tried to link with the recommended flag -sMIN_SAFARI_VERSION=120000. It didn't help. See the next section.
Reproduction sample
I managed to create a sample project to reproduce the problem.
It helped me to discover that the optimisation flags make a difference to the result. Using none or little optmisiations (-O0 & -O1) it will work fine when I also use -s MIN_SAFARI_VERSION=120000. But bigger optimisations (-O2 and more) will always fail with the error no matter if MIN_SAFARI_VERSION was set or not.
This is the project setup I am using:
index.html
<!DOCTYPE html><html><head><metacharset="UTF-8"><title>WebAssembly using Emscripten</title></head><bodystyle="background-color:#1D1E20; color:wheat"><h1>Test</h1><script>constworker=newWorker('worker.js');</script></body></html>
source"/Users/ricardperez/gitlab/emscripten-core/emsdk/emsdk_env.sh"&> /dev/null
emsdk install 3.1.26
emsdk activate 3.1.26
em++ lib.cpp -o lib.js -O2 -sMIN_SAFARI_VERSION=120000
# note that using -O1 makes it work as expected# emrun index.html
Please include the following in your bug report:
Version of emscripten/emsdk:
3.1.26I tested and verified that things work as expected in
3.1.25.Please include the output
emcc -vhereFailing command line in full:
N/A
Full link command and output with
-vappended:Even for runtime issues it helps a lot if you can include the full link command.
Adding
-vto the link command will show all of the sub-commands run whichcan help us diagnose your issue.
This is the output of both build and link as I do it all in a single step:
The issue
I have discovered that my application is not working on iOS 14.3 (and lower) - and it should.
This is the error I am seeing:
The issue started to happen when the emscripten toolchain was bumped from version
3.1.23to3.1.34. I have done different builds with different Emscripten versions and this only happens starting at3.1.26. Checking the release notes in the changelog I see this:This explicitly says that iOS min version was changed from
12.0.0to14.1. I am testing with iOS14.3, so in theory I should not be affected by this. But anyway I tried to link with the recommended flag-sMIN_SAFARI_VERSION=120000. It didn't help. See the next section.Reproduction sample
I managed to create a sample project to reproduce the problem.
It helped me to discover that the optimisation flags make a difference to the result. Using none or little optmisiations (
-O0&-O1) it will work fine when I also use-s MIN_SAFARI_VERSION=120000. But bigger optimisations (-O2and more) will always fail with the error no matter ifMIN_SAFARI_VERSIONwas set or not.This is the project setup I am using:
index.html
worker.js
lib.cpp
And this is the build script:
Any clue of what might be causing the problem?