Sunday, October 9, 2011

llvm-svn branch has been merged

The llvm-svn branch of Emscripten has been merged to master, in preparation for Emscripten 2.0, after all tests have been fixed and all speed regressions resolved. If you are currently using master, the consequences of that are:
  • You should use LLVM's svn (soon to be 3.0). LLVM 2.9 might still work, but it isn't guaranteed. Also, LLVM 3.0 is deprecating llvm-gcc, so Emscripten no longer uses that in its tests (as with 2.9, it might still work, but it might not). clang in 3.0 is much improved and is able to compile much more code than 2.9, so llvm-gcc is less necessary; there is also dragonegg which combines LLVM and GCC in a different manner, but its website says it is not mature yet.
  • Emscripten now uses its own header files, not your system headers. That means that Emscripten should now work on all platforms exactly the same. However, if you were using Emscripten to compile something that relied on your system headers, you might need to change how your project is built (that is, tell it to use those headers and not just Emscripten's bundled ones in system/include). Note that if you do not use the bundled headers, you will probably need to use the -H flag with, which tells it what headers to parse for constants (library.js needs to be aware of constants in your library headers, so that it is synchronized with them).
Please report bugs if you find them. If there are no show-stoppers, Emscripten 2.0 will be released soon.


  1. nice tool , we will try port this .. with emscripten

    sdl lib port.. what is the current state?

  2. The SDL lib port has been worked on for some specific goals. It is complete enough to work with Doom and several other examples, but it is not 100% complete - we did not look at all the various corners of SDL.

    But, it should be straightforward to implement missing parts if any, for your project - feel free to file issues on github and I will do my best to help.