-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build liblmdb, associated tools and tests with zig build system #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add strip and lto options use zig native backend and linker in debug mode test is still not compiling, look into it
The test step runs all the test, they currently are all failing this would be fixed in a future commit The tool step installs all the lmdb binary tools Rename some varibles to make their intent clear
The step currently isn't robust but will fix it soon check if addIncludePath is available else use addIncludeDir
don't set preferred mode to allow library users to specify optimize mode always translate the headers in debug mode
from discussions on discord step dependencies are run concurrently so when create_testdb is run as a dependency of install-test it is usually run early, my assumption is because it performs a simple operation to fix this I made the make fn of create_testdb the make of the install-step, this ensures that is is only run after all dependencies have runned another way to go would be ```zig const install_test_step = b.step("test", "install testdb"); const create_testdb_step = create_testdb.create_testdb(b); install_test_step.dependOn(create_testdb_step); create_testdb_step.dependOn(create_test_step); ``` as was suggested by @kprotty on discord but I chose the solution in this commit because it has the benefit that it is simple and it won't show up in `zig build` so that users don't just run the `create_testdb` step without actually installing the test
test 3 and 5 panic with illegal instruction when built with -fsanitize-c
And don't use lld on macos
pass -D_DARWIN_C_SOURCE to macos builds, from my reading online this macro defines some legacy typedefs from BSD that are still lingering in macos headers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add CI script and ensure it builds on Linux, macOS, and Windows
Add steps to install liblmdb, build tools and install test
Add a Zig module that provides an interface to the liblmdb headers
Test it out with recblock to ensure things are working as expected