Skip to content

Update build.zig to compile on the latest stable Zig 0.15.2#894

Open
bernardassan wants to merge 2 commits intoPCRE2Project:mainfrom
bernardassan:main
Open

Update build.zig to compile on the latest stable Zig 0.15.2#894
bernardassan wants to merge 2 commits intoPCRE2Project:mainfrom
bernardassan:main

Conversation

@bernardassan
Copy link

Add a named LazyPath called pcre2.h, which library users can import and add to their projects' include directory, like https://github.com/bernardassan/Glib/blob/49ef9727f43d41011baa1f3961076a29ebebb515/build/glib/root.zig#L93

Add some more config_h options

Correctly set PCRE2_EXPORT

Add a named LazyPath to pcre2_h so library uses can add pcre2_h to
their projects include paths

Add some more config_h options

Correctly set PCRE2_EXPORT

Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
@NWilson
Copy link
Member

NWilson commented Mar 21, 2026

Thank you for this contribution! I have raised some questions, but in principle, if it builds for you and on our CI, I am happy to accept it.

@bernardassan
Copy link
Author

I will update this PR in the morning, done some changes already

remove unused config options

make visibility actually work (tested to be working with my project https://github.com/bernardassan/Glib/tree/glib_tests)

even though I was resisting, expose "pcre2posix.h" as a named LazyPath
for users who want to use this api instead

Add sanitize_c option

Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
@bernardassan
Copy link
Author

Updated PR with suggestions from the review

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.

2 participants