What version of LLVM does the latest emscripten use?

时光怂恿深爱的人放手 提交于 2020-03-02 09:30:11

问题


What version of LLVM does the latest emscripten use? I googled for this quite a while but could not find any info. The background is that I've got some C++ code that requires clang-5.0 - what are the chances that it would compile with emscripten? Or at least code that needs clang-4.0?


回答1:


The latest version of emscripten uses clang version 4:

$ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.21
clang version 4.0.0 (https://github.com/kripken/emscripten-fastcomp-clang.git 974b55fd84ca447c4297fc3b00cefb6394571d18) (https://github.com/kripken/emscripten-fastcomp.git 087c6b7b18b7b769d4ad8f2ac3e0dd0ae6b924c2) (emscripten 1.37.21 : 1.37.21)
Target: x86_64-apple-darwin16.7.0
Thread model: posix

However, you can build WebAssembly without emscripten, by using the clang, llc, s2wasm and wasm tools separately as documented in this gist.

Another good alternative is the wasm-toolchain project:

https://github.com/tpimh/wasm-toolchain

With this installed, I have clang version 6:

$ ./clang --version
clang version 6.0.0 (http://llvm.org/git/clang.git 9411957410813aeefc1bb299abcb856ce1ef8aae) (http://llvm.org/git/llvm.git 68b21d6108df63d65d6735e9686d53cca844e37a)
Target: x86_64-apple-darwin16.7.0
Thread model: posix


来源:https://stackoverflow.com/questions/46458087/what-version-of-llvm-does-the-latest-emscripten-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!