emscripten-core / emscripten-fastcomp

LLVM plus Emscripten's asm.js backend
Other
182 stars 111 forks source link

documentation #224

Closed qknight closed 6 years ago

qknight commented 6 years ago

problem

in nixpkgs we have a nice emscripten abstraction https://github.com/NixOS/nixpkgs/pull/35636 but it stopped to work and while trying to fix it i realized that i actually don't understand how to update it properly.

  1. a lack of documentation

    https://github.com/kripken/emscripten https://github.com/kripken/emscripten-fastcomp https://github.com/kripken/emscripten-fastcomp-clang

    when reading either of these top level README.md there is no reference to the other (similar) named projects and no explanation how they interact or what that prticular repository is about and how to compile stuff.

    • for instance: am i supposed to use 1.37.36 for all of these targets (emscripten, emscripten-fastcomp/emscripten-fastcomp-clang) or can i safely mix the versions?
  2. what is the expected LLVM version to build these targets with?

    i've tried 3.x, 4.x and 5.x and for 1.37.36 and it always failed on nixos so i went back to 1.37.35 but can i use different LLVM versions for emscripten-fastcomp and emscripten-fastcomp-clang for instance?

summary

i'm still confused and since we don't have the tests enabled for nixos.emscripten by default, which is something i want to change, we don't even see if emscripten is working properly or if the nixpkgs based emscripten toolchain is broken.

kripken commented 6 years ago

Sorry for the lack of docs. Yes, you should use the same emscripten version in all 3 repos (emcc should warn if you do not).

You must also use the same version of LLVM and clang (unrelated to emscripten - if those repos don't match, LLVM won't be able to use clang properly). The same emscripten version in those repos will take care of that for you. Likewise the same emscripten version will ensure you are on the right LLVM version.

qknight commented 6 years ago

we have now a common revision for all emscripten related projects:

https://github.com/NixOS/nixpkgs/pull/35636#issuecomment-373884228

thanks for your help!