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

fix Issue 22727 ImportC: add __stdcall Windows calling convention #13614

Merged
merged 2 commits into from Feb 6, 2022

Conversation

WalterBright
Copy link
Member

Works same as extern (Windows) in D.

This is a partial fix for https://issues.dlang.org/show_bug.cgi?id=22727 in that it does not implement __fastcall. There are no plans to implement __fastcall.

__stdcall is poorly documented by Microsoft. Figuring out where it can appear in the grammar is the result of trial and error.

@WalterBright WalterBright added the ImportC Pertaining to ImportC support label Feb 6, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
22727 major ImportC: support for __stdcall and __fastcall is necessary for 32-bit Windows builds

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13614"

@WalterBright
Copy link
Member Author

buildkite dmd/druntime fails with:

Error: The command exited with status 2

of which no illumination is given in the voluminous log file. It's likely a heisenbug, as this change has nothing to do with druntime.

The log file is also full of exceptions and other faults, that seem to be ignored.

@thewilsonator
Copy link
Contributor

There was one about __xopsuchandsuch that I'm pretty sure could be related to that.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2022

If in doubt, rebase local branch on current head. Likely just mismatching runtime and compiler (which wouldn't happen if they were in the same repo).

@WalterBright
Copy link
Member Author

@ibuclaw thanks, trying that.

Why is buildkite retesting druntime anyway? Aren't all the endless other builds doing that enough?

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2022

@ibuclaw thanks, trying that.

Why is buildkite retesting druntime anyway? Aren't all the endless other builds doing that enough?

Would it be building it via dub? Just hazarding a guess though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Bug Fix ImportC Pertaining to ImportC support
Projects
None yet
4 participants