Conversation
Updated required dependencies: - llvm_git 1605fce6c3074f8d1dff5a917a1840ffa66abd86 -> 3644726a78e37823b1687a7aa8d186e91570ffe2 Added a workaround for https://bugs.llvm.org/show_bug.cgi?id=50611 to llvm_git - binaryen: v96 -> v101 Added a workaround patch for incorrect linker invocation in updated emscripten Fixed building emscriptenPackages.zlib and emscriptenPackages.json_c under updated emscripten
7ec7ab2 to
e444bd9
Compare
|
Just realized |
|
|
||
| patches = [ | ||
| # Adds --minimize-wasm-changes option required by emscripten 2.0.1 | ||
| (fetchpatch { |
There was a problem hiding this comment.
Please remove the unused fetchpatch from inputs.
| nativeBuildInputs = [ makeWrapper ]; | ||
| buildInputs = [ nodejs python3 ]; | ||
|
|
||
| resourceDir = "${llvmEnv}/lib/clang/13.0.0/"; |
There was a problem hiding this comment.
Please substitute the version number.
| substituteInPlace emcc.py \ | ||
| --replace \ | ||
| "['--sysroot=' + shared.Cache.get_sysroot(absolute=True)]" \ | ||
| "['--sysroot=' + shared.Cache.get_sysroot(absolute=True), '-resource-dir=${resourceDir}', '-idirafter' + shared.Cache.get_sysroot(absolute=True) + os.path.join('/include'), '-iwithsysroot' + os.path.join('/include','c++','v1')]" |
There was a problem hiding this comment.
Maybe we should use a patch instead.
|
LLVM 13.0.0rc1 is now in master |
|
I have a seemingly working emscripten 2.0.26 on my local branch, should I push it to this PR or create a new one @khovansky-al ? |
|
@yu-re-ka thanks for taking on this. Feel free to open a new PR, I'll close this one in favor of yours. A bit busy with other things these days and probably won't have time to sit down and properly finish this for another week or two. P.S. appreciate the attribution in your branch's commits. For Github to pick it up though I think the trailer should be |
Motivation for this change
Taking advantage of latest SIMD spec in WASM requires a much newer version of emscripten as well as (yet unreleased) clang 13 and a newer binaryen.
This PR updates emscripten to v2.0.25 (latest tag release). Binaryen and llvm were updated to revisions specified in emscripten releases repo DEPS file. See emscripten-releases-tags for the mapping of tags in
emscripten-releasesto emscripten versions.I imagine
llvm_gitcould be updated any moment which could at some point break emscripten. Not sure what would be the best course of action, asllvm_gitdoesn't seem to allow overrides.Starting with clang 12, one of LLVM's modules is miscompiled under gcc resulting in random segfaults when precompiling emscripten libraries cache. I added a workaround taken from the bug's page: https://bugs.llvm.org/show_bug.cgi?id=50611
As for testing, out of
emscriptenPackageson current master onlyzlibappears to be building.libxml2,xmlmirrorandjson_care already broken.I made adjustments that keep
zlibbuilding as well as fixlibxml2andjson_c.xmlmirrorappears to be more deeply broken and I don't have time to fix it.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)