Repository navigation
build_system: Make build config typed - #1075
Merged
Merged
Conversation
tact1m4n3
marked this pull request as draft
October 7, 2026 19:52
tact1m4n3
marked this pull request as ready for review
October 8, 2026 15:52
Grazfather
approved these changes
Oct 8, 2026
mattnite
approved these changes
Oct 9, 2026
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.
Add memory_regions to build config which will come in handy in #1067 for determining the flash size at comptime. Adding it directly with the previous system didn't work because of addOptions limitations (generates bad code for slices/arrays which doesn't compile), also unions didn't work (we used a workaround before for end_of_stack). This could be fixed in upstream zig (and probably will be soon), but personally I prefer this variant as we don't regenerate the types (as addOption does). Also this is quite a good use for zon imo :)
I also turned get_end_of_stack into a constant (imo a function is unnecessary) which I am not sure belongs in utilities, but idk where to move it.