Skip to content
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

No calling convention for msvc on x86_64 non-windows targets #11585

Closed
N00byEdge opened this issue May 5, 2022 · 0 comments · Fixed by #11599
Closed

No calling convention for msvc on x86_64 non-windows targets #11585

N00byEdge opened this issue May 5, 2022 · 0 comments · Fixed by #11599
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Milestone

Comments

@N00byEdge
Copy link
Sponsor Contributor

N00byEdge commented May 5, 2022

The Win64 calling convention is the same as Cdecl on Windows x64, however using .C as a stand-in for the Win64 calling convention only works if your compiler targets Windows. This means you're not able to create a function with the Win64 calling convention if you're not targeting Windows.
It should be fairly straightforward to support LLVM's Win64 calling convention such that it can be used from Zig code on any target.

@N00byEdge N00byEdge changed the title No No calling convention for msvc on x86_64 non-windows targets May 5, 2022
N00byEdge added a commit to N00byEdge/zig that referenced this issue May 6, 2022
@andrewrk andrewrk added this to the 0.10.0 milestone May 8, 2022
@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label May 8, 2022
andrewrk pushed a commit that referenced this issue May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants