Skip to content

compiler: Move int size/alignment functions to std.Target and std.zig.target #23483

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

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Apr 6, 2025

No description provided.

alexrp added 2 commits April 11, 2025 05:22
To be consistent with the other functions that answer C ABI questions.
….target.

This allows using them in e.g. compiler-rt.
@jacobly0 jacobly0 force-pushed the target-int-functions branch from da4c57e to 303ea22 Compare April 11, 2025 10:22
Also, accepting `align(1)` pointers ensures that the alignment is safety
checked rather than assumed.
This was a hack around compiler-rt not computing the correct size.
@jacobly0 jacobly0 force-pushed the target-int-functions branch from 303ea22 to 27cfff8 Compare April 11, 2025 11:06
Copy link
Member

@jacobly0 jacobly0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any strong opinions about this change, so I can at least demonstrate why it is necessary for any other reviewers.

@alexrp alexrp enabled auto-merge April 11, 2025 11:19
@alexrp alexrp merged commit 90084f4 into ziglang:master Apr 11, 2025
9 checks passed
@alexrp alexrp deleted the target-int-functions branch April 11, 2025 16:00
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.

2 participants