Always link system libraries This changes the logic for linking system libraries from parsing the input object and the `.symbols` files, to simply include the libraries a link time in all cases. The `.symbols` file logic were originally added as an optimization would allow only the libraries needed to be considered at link time. However, this optimization I believe was put in place for fastcomp where the build time cost of including a library was significant because all libraries would be passed to opt/llc. The idea was that minimal programs might be need to libc at all the there build faster (even though the resulting output would not be effected due to DCE). It an optimization that apply with the wasm backend where linking is fast and `.a` libraries are handled efficiently. What is more there are basically no real programs that don't use libc and for those programs we already have the `-nostdlib` option. The `.symbols` files are still used for some optional libraries such as libhtml, libgl and libal. However the plan is to also remove that logic in STRICT mode too. Once we do that we can avoid having to run llvm-nm on each input object file. See #8912.
Main project page: http://emscripten.org
Emscripten compiles C and C++ to WebAssembly using LLVM and Binaryen. Emscripten output can run on the Web, in Node.js, and in wasm runtimes.
Emscripten provides Web support for popular portable APIs such as OpenGL and SDL2, allowing complex graphical native applications to be ported, such as the Unity game engine and Google Earth. It can probably port your codebase, too!
While Emscripten mostly focuses on compiling C and C++ using Clang, it can be integrated with other LLVM-using compilers (for example, Rust has Emscripten integration, with the wasm32-unknown-emscripten and asmjs-unknown-emscripten targets).
Emscripten is available under 2 licenses, the MIT license and the University of Illinois/NCSA Open Source License.
Both are permissive open source licenses, with little if any practical difference between them.
The reason for offering both is that (1) the MIT license is well-known, while (2) the University of Illinois/NCSA Open Source License allows Emscripten's code to be integrated upstream into LLVM, which uses that license, should the opportunity arise.
See LICENSE for the full content of the licenses.