[wasm] Switch to the LLVM wasm backend. (#14734)
commit16532397c362cf66da55be388dc84bb7b3ad6ad1
authorZoltan Varga <vargaz@gmail.com>
Sat, 8 Jun 2019 04:46:56 +0000 (8 00:46 -0400)
committerGitHub <noreply@github.com>
Sat, 8 Jun 2019 04:46:56 +0000 (8 00:46 -0400)
treeec6b4a4e1629bf36cf29980f353ae1475b436542
parentf5cfc67c8edc8a3172d146b84c6dcb3a6414c216
[wasm] Switch to the LLVM wasm backend. (#14734)

* [wasm] Switch to the llvm wasm backend.

* [wasm] Packager changes for the wasm backend.

* -s EMULATED_FUNCTION_POINTERS=1 no longer needed.
* Run wasm-strip on the final binary.
* Run opt during AOT.
* Disable the dynamic build for now, it doesn't seem to work with the wasm backend.

* [wasm] Use STACK_MAX instead of STACK_BASE for the bottom limit of the stack.

* [aot] Handle llvmopts= in llvmonly mode as well.

* [wasm] Disable an assertion which is no longer true with the wasm backend.

* [wasm] Disable computed gotos in the interpreter, the wasm backend doesn't support it.

Fix llvm target layout so its compatible with clang compiled code.

* [wasm] Pass llvm-path to the cross compiler.

* [wasm] Fix some problems with the dynamic build, still doesn't work. Fix packaging.

* [wasm] Pass -s DISABLE_EXCEPTION_CATCHING=0 to the runtime build, otherwise catch clauses are not generated in llvm-runtime.cpp.

* [aot] Allow llvmopts= argument multiple times.

* Bump emscripten version to 1.38.34.

* [wasm] Add https://github.com/emscripten-core/emscripten/pull/8457 as a patch.

* [wasm] Compile the aot .bc files to .o in a separate step using emcc, this will help with incremental compilation later.

* [wasm] Source emsdk_set_env.sh instead of emsdk_env.sh the latter calls emsdk construct_env to construct emsdk_set_env.sh which is racy.
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/interp/interp.c
mono/mini/mini-wasm.h
mono/utils/mono-threads-wasm.c
sdks/builds/emscripten-pr-8457.diff [new file with mode: 0644]
sdks/builds/wasm.mk
sdks/wasm/Makefile
sdks/wasm/packager.cs