Zig build improvements#5702
Merged
Merged
Conversation
- Added zig-pkg directory to gitignore - Brought min zig version to recent nightly release these improvements were completed on - For linux build, only add rglfw.c if the platform is glfw - Add a None option to the LinuxDisplayBackend - Fixed xcode-frameworks dependency and update to using most recent commit hash
Owner
|
@dotmrjosh thanks for the review |
This file contains hidden or 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
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.
This fixes a minor dependency issue I was having and tweaks the
build.ziga bit.For some context, I was looking to use raylib to create games/apps with zig for the Miyoo Mini+ (a small linux gameboy like handheld) with the SDL backend.
I've done all this development on macos so apologies ahead of time that I can't test other platforms (except a niche linux one). However since this only affects the zig build, it should be reasonably low risk, and I think it's fair to expect the zig usage to come with some rough edges.
Changes
Zig min version bump
Past issues/PRs have agreed to follow the zig nightly builds. So this just bumps that version to the most recent one that I tested this PR with.
Added zig-pkg directory to gitignore
Zigs latest package manager places the packages/dependencies in the project root under
zig-pkgso it can be ignored by git. (Similar to nodejsnode_modulesdirectory).Add a
Noneoption for theLinuxDisplayBackendenumIn my niche case, Miyoo Mini+ doesn't have a desktop environment of any kind and the SDL implementation just directly talks to the frame buffer, so this option allows me to still build for linux, but omit X11 and Wayland sources.
Linux build potentially unnecessarily links
rglfw.cFor some reason when I had SDL as the platform selected, it would still add
rglfw.cfor compilation causing issues (as glfw expects there to be X11 or Wayland on linux). There may be a couple more places this issue occurs but I have left them unchanged without any way to test currently.xcode-frameworks dependency was incorrect
Zig could never build as the hash was not the correct format. The version being downloaded was not the latest commit so in fixing the hash, I've brought the dependency commit up to the most recent.