-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to build from source #6952
Comments
The misunderstanding here might be with the LLVM wasm backend. When that is used, fastcomp (both LLVM and clang) are not needed, as we use the LLVM wasm backend instead of the fastcomp asm.js backend. Emscripten supports both backends currently, but the asm.js one is the default as it is more stable. I'd still recommend using that, and it's what the docs talk about. But we hope to switch the default to the wasm backend eventually. |
Thanks for the clarification. That's very helpful. As we are interested in using Conda ( conda/conda#7619 ) for handling the building and packaging of WebAssembly libraries, trying to figure out the best way to create and package the build toolchain first and then figure out what the packaging story should look like for WebAssembly. Have just recently rebuilt the LLVM stack in conda-forge to support the WebAssembly backend. ( conda-forge/llvmdev-feedstock#42 ) That seems to work reasonably well in simple programs. Was thinking about going the fastcomp route, but that seems like a lot of work if it is soon going to be deprecated and replaced. Is there a timetable for that? Currently it looks like the Was able to package Binaryen in Looking at Also am trying to figure out what the best story is for an Emscripten package. Is there some build step somewhere (particularly for the Thoughts on any/all of this would be greatly appreciated. |
No timetable yet. But I expect we'll support fastcomp for a long time, for asm.js support, even after the wasm backend is the default. I'd say that if the wasm backend path has all the features you need (i.e., you don't need asm.js or any fastcomp-specific feature) then no need for fastcomp.
Emscripten's libc is complete and very stable at this point. I'd just use that, unless you have very custom needs and can afford to do extra work.
For the wasm backend path, you also need Binaryen is also necessary, as you mentioned.
The emsdk can do most of all of the above for you. I'm not familiar with conda, so not sure if a comparison is relevant or not. But look at the emscripten tutorial - the idea with the emsdk is that you get it, then it gets everything else you need: LLVM, clang, lld, binaryen, etc. etc., including binary builds when available. In general, projects using emscripten often use the emsdk to do the work for them, or they tell their users to just grab the emsdk. Emscripten itself will create |
Thanks for the advice. So I started building Emscripten's Edit: Think this was due to incompatible versions of LLVM and Emscripten. Changing to an older version of Emscripten worked around this issue. |
If you want to use the llvm backend with Emscripten you really want to be using the latest tip of tree version of LLVM. In the future we may support older/stable LLVM releases but right now we are still working on the backed so you want the very latest version. |
That makes sense. Is it reasonable to use slightly older versions of Emscripten along with a stable version of LLVM or is that not really viable? |
Sure that should work, just remember that there only a very vague (major version only) link between the LLVM version and the emscripten version, so you are probably going to have select an emscripten version that roughly matches (in time) the LLVM version you have. The upstream LLVM churn should get getting less frequent going forward so incompatibilities should become less frequent. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
Have been reading over the docs and some related discussions. Based on the docs my understanding is one builds the patched versions of LLVM and Clang (called Fastcomp and Fastcomp-Clang) then one downloads Emscripten somewhere (no build steps here?). However recent conversations make it sound like LLVM has taken on the role of Fastcomp and Fastcomp-Clang. Is that correct or am I misunderstanding something? If so, does that mean the build steps are now just download Emscripten? If not, will Fastcomp and Fastcomp-Clang clash with an existing LLVM and Clang install or are they renamed in such a way to avoid clashing?
ref: emscripten-core/emscripten-fastcomp#193 (comment)
ref: #5488
ref: #6350
ref: #6830
The text was updated successfully, but these errors were encountered: