Skip to content

build_system: Make build config typed - #1075

Merged
mattnite merged 5 commits into
mainfrom
typed_build_config
Oct 9, 2026
Merged

mattnite merged 5 commits into
mainfrom
typed_build_config

Conversation

@tact1m4n3

Copy link
Copy Markdown
Collaborator

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.

@tact1m4n3
tact1m4n3 marked this pull request as draft October 7, 2026 19:52
@tact1m4n3
tact1m4n3 marked this pull request as ready for review October 8, 2026 15:52
@mattnite
mattnite merged commit 746b8be into main Oct 9, 2026
58 of 59 checks passed
@mattnite
mattnite deleted the typed_build_config branch October 9, 2026 13:57
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.

3 participants