-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Makefile: Compile zlib .c files with DMD via importC #8865
Conversation
|
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8865" |
This fixes an undefined `__va_start` symbol for the zlib parts, a problem on Win64 only so far. The Microsoft headers use something like this (`vadefs.h`) for x86_64: ``` void __cdecl __va_start(va_list* , ...); ``` The signature of their intrinsic isn't compatible with druntime's `va_start` (which takes the first param as `out` ref, not as explicit pointer), so I sadly don't see a way to handle this in druntime's `__builtins.di` (or `importc.h`).
|
Argh, the Microsoft headers use something like this ( void __cdecl __va_start(va_list* , ...);
#define __crt_va_start_a(ap, x) ((void)(__va_start(&ap, x)))The signature of their intrinsic isn't compatible with druntime's I've worked around it for now, via |
|
Is this ready to go? |
|
The zlib hack obviously isn't ideal, but probably better than keeping on using the C compiler. |
|
I opened an issue for it: https://issues.dlang.org/show_bug.cgi?id=24310 |
|
Looks like this broke Windows builds on DMD. https://github.com/dlang/dmd/actions/runs/7376357253/job/20069039989 |
According to earlier CI results, this works - except for a problem on Win64 only:
So looks like this
__va_startcould be a candidate for inclusion in druntime's__builtins.di(which already defines a__builtin_va_startalias).