Thread overview | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 19, 2016 LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Hey all, I'm proud to announce that MSVC is fully supported now for LDC trunk. Rainer Schuetze has implemented MSVC-compatible exception handling (available since brand-new LLVM 3.8) for LDC, so that we have fully working exception chaining now on Win64. Along the way, he also added 32-bit MSVC support and a TLS alignment bugfix for Windows < 8.1 (a Windows bug/wontfix!). It requires a bleeding edge LLVM though, as Rainer's work has uncovered a few LLVM bugs which didn't make it into 3.8 final. So a round of applause for Rainer and the LLVM devs, excellent job, thank you very much! Full PDB support for LLVM is also underway... CI testing with AppVeyor has been improved, so that the full test suite is run for both x86 and x64 MSVC targets. All tests pass except for 3 rather negligible issues (see https://github.com/ldc-developers/ldc/pull/1354#issuecomment-198572582 for details). The automatically updated GitHub release (http://wiki.dlang.org/Latest_LDC_binaries_for_Windows) now also includes a downloadable 32-bit LDC build. Wiki pages have been updated accordingly. Check out http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC if you want to start contributing too! Setting up the dev environment isn't that hard, I promise. :) |
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | On 3/19/2016 6:23 AM, kinke wrote:
> I'm proud to announce that MSVC is fully supported now for LDC trunk. Rainer
> Schuetze has implemented MSVC-compatible exception handling (available since
> brand-new LLVM 3.8) for LDC, so that we have fully working exception chaining
> now on Win64. Along the way, he also added 32-bit MSVC support and a TLS
> alignment bugfix for Windows < 8.1 (a Windows bug/wontfix!). It requires a
> bleeding edge LLVM though, as Rainer's work has uncovered a few LLVM bugs which
> didn't make it into 3.8 final.
> So a round of applause for Rainer and the LLVM devs, excellent job, thank you
> very much! Full PDB support for LLVM is also underway...
Congratulations!
|
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | This is extremely good news! Where is LDC at with the D frontend at the moment? Have Walter's numerous February fixes for C++ compatibility made their way in yet? Also, out of curiosity, has anyone looked at connecting the MS codegen (C2.DLL) to LDC like MS do with Clang+C2 (Clang frontend w/ MS codegen) that was released in VS2015 Update 1/2? I suspect their C2.DLL connectivity code must be available(?), and theoretically LDC could connect to it for codegen the same way Clang does(?), and that would lead to 100% MS compatible binary and debuginfo output. ClangC2 produces binaries that are almost indistinguishable from MSVC compiled binaries while debugging. On 19 March 2016 at 23:23, kinke via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > Hey all, > > I'm proud to announce that MSVC is fully supported now for LDC trunk. Rainer > Schuetze has implemented MSVC-compatible exception handling (available since > brand-new LLVM 3.8) for LDC, so that we have fully working exception > chaining now on Win64. Along the way, he also added 32-bit MSVC support and > a TLS alignment bugfix for Windows < 8.1 (a Windows bug/wontfix!). It > requires a bleeding edge LLVM though, as Rainer's work has uncovered a few > LLVM bugs which didn't make it into 3.8 final. > So a round of applause for Rainer and the LLVM devs, excellent job, thank > you very much! Full PDB support for LLVM is also underway... > > CI testing with AppVeyor has been improved, so that the full test suite is run for both x86 and x64 MSVC targets. All tests pass except for 3 rather negligible issues (see https://github.com/ldc-developers/ldc/pull/1354#issuecomment-198572582 for details). > > The automatically updated GitHub release (http://wiki.dlang.org/Latest_LDC_binaries_for_Windows) now also includes a downloadable 32-bit LDC build. > > Wiki pages have been updated accordingly. Check out http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC if you want to start contributing too! Setting up the dev environment isn't that hard, I promise. :) |
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Sunday, 20 March 2016 at 10:54:54 UTC, Manu wrote: > Where is LDC at with the D frontend at the moment? > Have Walter's numerous February fixes for C++ compatibility made their > way in yet? Trunk (master branch) is at D2.069.2. The merge-2.070 branch already exists, so it won't take long for us to catch up. > Also, out of curiosity, has anyone looked at connecting the MS codegen > (C2.DLL) to LDC like MS do with Clang+C2 (Clang frontend w/ MS > codegen) that was released in VS2015 Update 1/2? Nope, I haven't and I suspect noone else has. I don't see any benefit except for debug infos at the moment, but I guess full support in LLVM itself won't take ages. |
March 21, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | On 20 March 2016 at 22:53, kinke via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On Sunday, 20 March 2016 at 10:54:54 UTC, Manu wrote: >> >> Where is LDC at with the D frontend at the moment? >> Have Walter's numerous February fixes for C++ compatibility made their >> way in yet? > > > Trunk (master branch) is at D2.069.2. The merge-2.070 branch already exists, so it won't take long for us to catch up. Awesome, looking forward to trying it out! >> Also, out of curiosity, has anyone looked at connecting the MS codegen >> (C2.DLL) to LDC like MS do with Clang+C2 (Clang frontend w/ MS >> codegen) that was released in VS2015 Update 1/2? > > > Nope, I haven't and I suspect noone else has. I don't see any benefit except for debug infos at the moment, but I guess full support in LLVM itself won't take ages. It's been many years so far... what's a couple more? ;) It would be interesting to know if it's possible/reasonably simple. The advantage is, in addition to the obvious debuginfo, that the binary generated by the same codegen would definitely be completely compatible. I suspect performing the plug like Clang would take a very small time compared to the years we've already been waiting for the LLVM/MS guys to get comprehensive debuginfo into LLVM, and that's assuming that LLVM is even capable of expressing all the data in MS's debuginfo format? MSVC debuginfo is very good; it has data such that variables follow their registers around in fully optimised builds, making release build debugging fast and effortless. |
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Sunday, 20 March 2016 at 14:15:19 UTC, Manu wrote: > It's been many years so far... what's a couple more? ;) I know, but MSVC targets have just recently gained a lot of momentum, and MS has started contributing too. > The advantage is, in addition to the obvious debuginfo, that the > binary generated by the same codegen would definitely be completely compatible. Completely compatible to what? An identical IR generated by clang for a 1:1 translation of a D source to C++ (in cases where that's even possible)? > assuming that LLVM is even capable of expressing all the data in MS's debuginfo format? For me the question is rather whether the MS backend really fully supports LLVM IR, especially wrt. ABI details, alignments, EH etc., or if it just supports what clang emits. |
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu |
On 20.03.2016 11:54, Manu via Digitalmars-d-announce wrote:
> Also, out of curiosity, has anyone looked at connecting the MS codegen
> (C2.DLL) to LDC like MS do with Clang+C2 (Clang frontend w/ MS
> codegen) that was released in VS2015 Update 1/2?
> I suspect their C2.DLL connectivity code must be available(?), and
> theoretically LDC could connect to it for codegen the same way Clang
> does(?), and that would lead to 100% MS compatible binary and
> debuginfo output.
> ClangC2 produces binaries that are almost indistinguishable from MSVC
> compiled binaries while debugging.
I just tried to find some information about C2.DLL, but it seems they haven't made anything public yet. Grepping Microsofts' github forks of llvm/clang didn't reveal anything, too.
|
March 20, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | Wrt. MSVC compatibility and LDC's new, MSVC-compatible EH: a few additional lines enable catching D exceptions in C++, see https://github.com/ldc-developers/druntime/pull/54/commits/7484da5a6b98c938fa153ec9a70bb4a08cc1fcf2 and https://github.com/ldc-developers/dmd-testsuite/pull/15/commits/a99e368cdd5bf5e1a6d48209093404a9fc114579 |
March 21, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | On Saturday, 19 March 2016 at 13:23:48 UTC, kinke wrote:
> Hey all,
>
> I'm proud to announce that MSVC is fully supported now for LDC trunk. Rainer Schuetze has implemented MSVC-compatible exception handling (available since brand-new LLVM 3.8) for LDC, so that we have fully working exception chaining now on Win64. Along the way, he also added 32-bit MSVC support and a TLS alignment bugfix for Windows < 8.1 (a Windows bug/wontfix!). It requires a bleeding edge LLVM though, as Rainer's work has uncovered a few LLVM bugs which didn't make it into 3.8 final.
> So a round of applause for Rainer and the LLVM devs, excellent job, thank you very much! Full PDB support for LLVM is also underway...
>
This is great, I don't have to write assembly anymore! Thanks LDC team.
|
March 21, 2016 Re: LDC now supports Windows MSVC x86/x64 as first class targets | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Sunday, 20 March 2016 at 14:15:19 UTC, Manu wrote:
> MSVC debuginfo is very good; it has data such that variables
> follow their registers around in fully optimised builds, making
> release build debugging fast and effortless.
That's backend feature, there are (usually) no registers on the frontend level.
|
Copyright © 1999-2021 by the D Language Foundation