Skip to content

Fix: Fetch SLJIT through the zig package manager for JIT builds - #922

Merged
NWilson merged 2 commits into
PCRE2Project:mainfrom
nankishre:main
Aug 9, 2026
Merged

Fix: Fetch SLJIT through the zig package manager for JIT builds#922
NWilson merged 2 commits into
PCRE2Project:mainfrom
nankishre:main

Conversation

@nankishre

@nankishre nankishre commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Zig fetched git packages do not include submodule contents, which caused the following error while building pcre2 with JIT mode on:

image

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.

Comment thread build.zig.zon
@nankishre

Copy link
Copy Markdown
Contributor Author

Squashed some commits ^^

Update workflow to change commit # on zig config at submodule commit change.

Change SLJIT commit # to master for testing workflow

Sync autogenerated files #noupdate

Revert to pinned sljit commit hash

Sync autogenerated files #noupdate
@NWilson

NWilson commented Aug 8, 2026

Copy link
Copy Markdown
Member

Hi @nankishre! I have tested this out, and made a few improvements. I needed help from AI because I don't really know Zig.

I believe we can update to Zig 0.16.0 now (and probably should do).

Over to you now, to review my changes!

Comment thread .github/workflows/dev.yml
Comment thread build.zig
Comment thread build.zig.zon
@NWilson NWilson added this to the 10.48 milestone Aug 8, 2026
@nankishre

Copy link
Copy Markdown
Contributor Author

LGTM!

@NWilson

NWilson commented Aug 9, 2026

Copy link
Copy Markdown
Member

Thank you NaN!

@NWilson
NWilson merged commit 2f98f73 into PCRE2Project:main Aug 9, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants