Fix: Fetch SLJIT through the zig package manager for JIT builds#922
Fix: Fetch SLJIT through the zig package manager for JIT builds#922nankishre wants to merge 1 commit into
Conversation
| .url = "git+https://github.com/zherczeg/sljit.git#45f910b78c6605ebf5b53d3ec7cb00f2312fe417", | ||
| .hash = "N-V-__8AAIUFRABdZku3bW_1S5GOC4iaFh17LsRurEDR1lvv", |
There was a problem hiding this comment.
wouldn't this require updating whenever a new version of the sljit submodule is committed?
a git clone is meant to be followed by git submodule update --init or equivalent; could zig or its package manager do that?
There was a problem hiding this comment.
Hi, yes the sljit commit hash would have to be updated whenever gitmodules changes aswell and I'm not aware of a helper cmd which has that feature.
Rn, the maintainers would have to run
zig fetch --save=sljit "git+https://github.com/zherczeg/sljit.git#$(git ls-tree HEAD deps/sljit | awk '{print $3}')"
every time sljit's commit # is changed. If they aren't interested in doing that maybe I could setup a workflow to check for and update the zig package that if that's okay.
Zig fetched git packages do not include submodule contents, which caused the following error while building pcre2 with JIT mode on:
So I made this tiny patch to fetch the pinned SLJIT revision through zig's package manager when JIT support is enabled and stage the fetched sources alongside
pcre2_jit_compile.c. This works without modifying the C source or affecting non-JIT builds of pcre2.