-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
MinGW-based libs: Add wide entry points #427
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. |
I still need to test this locally. Pinging @rainers. |
Tested |
Also proposed upstream: dlang/installer#427.
Also proposed upstream: dlang/installer#427.
Also proposed upstream: dlang/installer#427.
LGTM. You'll have to change of the name of the artifact to retrigger an actual build. We are skipping it if the artifact is already uploaded to dlang.org, see https://github.com/dlang/installer/blob/master/windows/build_mingw.bat#L6 |
Done. I also skip the 2nd compilation of msvcrt_stub.c for DLLs with |
Thanks. I was just doing the same and wondered why pushing failed ;-) BTW: I think it might be good to just put the VC redistributables into the installer, so probably best to add them here with something like:
That's hoping for them to be installed on Azure, though. |
|
Ok, I'll look into it. Adding the DLLs might also be better in a separate PR. |
I've tried to run the druntime unittests with the mingw-DLLs, but this failed miserably for x86 due to exceptions not working. Do you remember what the status was? The VC runtime initalizes some cookie with __security_init_cookie(); and uses __try {} __except. Did you try that, too? |
In contrast to MS link, LLD sets the "No structured exception handler" flag: If I clear that flag in the binary, exceptions seem to work. |
I'm pretty sure everything's working for LDC, incl. the 32-bit druntime/Phobos unittests. SafeSEH gave me some headaches, but IIRC, I've only had to modify LLVM's compiler-rt libs (making asm files SafeSEH compatible, getting rid of the 'security cookie' by compiling with |
dmd doesn't emit SAFESEH compatible object files (missing "@feat.00" and handler tables AFAICT), and lld complains about all of them if /SAFESEH is supplied. Fixing dmd won't be much fun, so it's simpler to make lld more compatible to MS link: #433 |
Ah yes, makes sense. |
@rainers: Merging is probably up to you... |
If we follow the idea of using github releases to publish the results (see #433 (comment)) the url to check for the existing artifact changes. It should be something like https://github.com/dlang/installer/releases/download/mingw-%MINGW_VER%-2/%ARTIFACT% Should we try this? |
Yep.
I would say so, because we could as a future step automate the upload. |
Finally... ;) |
I have added a check for the artifact on an expected github release. If it passes I'll merge and create the release with the respective tag... |
How would the creation of the sig file work? I've now struggled to use the "D Language Foundation" certificate to do that, but we don't have these files in the build pipeline. |
Thx Rainer. Are the libs now in use already, i.e., can we move forward with dlang/druntime#2932, or is the sig file a problem? |
It still needs an update for the installer, but the larger change might be to update dmd to use msvcrt120.lib. |
So that the user/druntime can use the wide
wmain
/wWinMain
C entry points too.