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.
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
Add support for building with Zig #598
Add support for building with Zig #598
Changes from all commits
a842861
8d2eeb5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to cross-compile for MacOS? I've failed to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a simple matter of:
zig build -Dtarget=x86_64-macos-none
Or aarch64-macos-none for apple silicon...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in an error:
.../bdwgc/extra/../os_dep.c:4354:10: error: 'mach/exception.h' file not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. see https://github.com/ivmai/bdwgc/actions/runs/7323413734/job/19945962265
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivmai ah yes, that's correct. I forgot I'm running with a patched zig. Zig doesn't ship with the correct headers just yet. I opened an issue for this ziglang/zig#18257. They're usually quite fast adding headers but I'm guessing it'll be after the holidays.
In Acton we add in a few extra headers, see https://github.com/actonlang/acton/tree/main/deps/zig-extras/lib/libc/include/any-macos-any
You can do the same, just copy into your zig/lib/...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's wait for right nightly build and then add macos targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right yes, agreed, let's wait for it.. I was just thinking if you wanted to test stuff locally first :)