www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - COFF support for Win32 merged

reply Jacob Carlborg <doob me.com> writes:
I though that this might be important enough to share on the announce list:

A pull request [1] by Rainer Schuetze which adds COFF support for Win32 
has recently been merged by Walter. It seems to be enabled using the 
-m32mscoff flag.

[1] https://github.com/D-Programming-Language/dmd/pull/3843

-- 
/Jacob Carlborg
Aug 17 2014
next sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 17/08/2014 9:57 p.m., Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Well this makes me happy :3 Thank you Rainer!
Aug 17 2014
prev sibling next sibling parent =?ISO-8859-1?Q?S=F6nke_Ludwig?= <sludwig rejectedsoftware.com> writes:
Am 17.08.2014 11:57, schrieb Jacob Carlborg:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Wow, that's fantastic news! Thank you very much Rainer!
Aug 17 2014
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Jacob Carlborg:

 A pull request [1] by Rainer Schuetze which adds COFF support 
 for Win32 has recently been merged by Walter. It seems to be 
 enabled using the -m32mscoff flag.
I have just recompiled dmd, but I don't see that new compiler switch (dmd 2.067). I am compiling in a wrong way? Bye, bearophile
Aug 17 2014
parent reply ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Sun, 17 Aug 2014 10:50:38 +0000
bearophile via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 I have just recompiled dmd, but I don't see that new compiler
 switch (dmd 2.067).
are you sure that you compiled dmd for 32-bit windows? other versions seems to not have this flag.
Aug 17 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
ketmar:

 are you sure that you compiled dmd for 32-bit windows? other 
 versions seems to not have this flag.
Yes, I am using a 32 bit Windows. Bye, bearophile
Aug 17 2014
parent reply ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Sun, 17 Aug 2014 11:34:59 +0000
bearophile via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 Yes, I am using a 32 bit Windows.
are you sure that you have latest git then? yes, i know that this is very silly question, but sometimes... ;-) unfortunately, i have no windows boxes (neither cross-compilers), so can't check it myself. but i see this in mars.c: #if TARGET_WINDOS else if (strcmp(p + 1, "m32mscoff") =3D=3D 0) { global.params.is64bit =3D 0; global.params.mscoff =3D true; } #endif ... static const char* parse_arch(size_t argc, const char** argv, const char* arch) { for (size_t i =3D 0; i < argc; ++i) { const char* p =3D argv[i]; if (p[0] =3D=3D '-') { if (strcmp(p + 1, "m32") =3D=3D 0 || strcmp(p + 1, "m32mscoff") =3D=3D 0 || strcmp(p + 1, "m64") =3D=3D 0) arch =3D p + 2; else if (strcmp(p + 1, "run") =3D=3D 0) break; } } return arch; } so i believe that it should work.
Aug 17 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
ketmar:

 are you sure that you have latest git then? yes, i know that 
 this is very silly question, but sometimes... ;-)
OK, -m32mscoff works (probably I was using a wrongly written switch), but I don't see it listed among the other compiler switches. Bye, bearophile
Aug 17 2014
next sibling parent reply ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Sun, 17 Aug 2014 13:01:06 +0000
bearophile via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 OK, -m32mscoff works (probably I was using a wrongly written=20
 switch), but I don't see it listed among the other compiler=20
 switches.
maybe this is due to mscoff support still considering 'experimental'?
Aug 17 2014
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/17/2014 6:11 AM, ketmar via Digitalmars-d-announce wrote:
 maybe this is due to mscoff support still considering 'experimental'?
It certainly is, as there is no druntime support for it, it is not tested by the autotester, etc.
Aug 17 2014
prev sibling next sibling parent "Joakim" <dlang joakim.airpost.net> writes:
On Sunday, 17 August 2014 at 13:01:07 UTC, bearophile wrote:
 ketmar:

 are you sure that you have latest git then? yes, i know that 
 this is very silly question, but sometimes... ;-)
OK, -m32mscoff works (probably I was using a wrongly written switch), but I don't see it listed among the other compiler switches.
You will need to use his unmerged branches of druntime and phobos also: https://github.com/rainers/druntime/tree/coff32 https://github.com/rainers/phobos/tree/coff32 Hopefully those get merged next, as I think this could be a big feature for the 2.067 release. Nice work, Rainer.
Aug 17 2014
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/17/14, 6:01 AM, bearophile wrote:
 ketmar:

 are you sure that you have latest git then? yes, i know that this is
 very silly question, but sometimes... ;-)
OK, -m32mscoff works (probably I was using a wrongly written switch)
schwartzSort comes to mind -- Andrei
Aug 17 2014
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/17/14, 7:58 AM, Andrei Alexandrescu wrote:
 On 8/17/14, 6:01 AM, bearophile wrote:
 ketmar:

 are you sure that you have latest git then? yes, i know that this is
 very silly question, but sometimes... ;-)
OK, -m32mscoff works (probably I was using a wrongly written switch)
schwartzSort comes to mind -- Andrei
forgot the smiley :o) -- Andrei
Aug 17 2014
parent "bearophile" <bearophileHUGS lycos.com> writes:
Andrei Alexandrescu:

 schwartzSort comes to mind -- Andrei
forgot the smiley :o) -- Andrei
Yeah that's an infamous example. Standard libraries should avoid too much hard to write identifiers. Bye, bearophile
Aug 17 2014
prev sibling next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 8/17/2014 5:57 AM, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Wow! This is MAJOR! o_O
Aug 17 2014
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/17/14, 11:39 AM, Nick Sabalausky wrote:
 On 8/17/2014 5:57 AM, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce
 list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Wow! This is MAJOR! o_O
Indeed! Does this enable VS debugging of D programs? Also, what's the deal on Win64? -- Andrei
Aug 17 2014
parent "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sunday, 17 August 2014 at 22:25:55 UTC, Andrei Alexandrescu 
wrote:
 Indeed! Does this enable VS debugging of D programs?
This enables using the MS C runtime for Win32 programs, but you could already use VS for debugging thanks to cv2pdb (also written by Rainer!). Though, now that the debug information is not channeled through the CodeView format, it might be more accurate.
 Also, what's the deal on Win64? -- Andrei
Win64 is COFF-only because OPTLINK is 32-bit-only, so PDB was DMD's only Win64 debugging format (not that that's a bad thing).
Aug 17 2014
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/17/2014 2:57 AM, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32 has
 recently been merged by Walter. It seems to be enabled using the -m32mscoff
flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Yes, it did turn out to be a much less intrusive change than I anticipated, and Rainer's work also included some sensible refactoring which was valuable in and of itself.
Aug 17 2014
prev sibling next sibling parent Manu via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On 17 August 2014 19:57, Jacob Carlborg via Digitalmars-d-announce <
digitalmars-d-announce puremagic.com> wrote:

 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843

 --
 /Jacob Carlborg
OMG, it happened! This is a glorious day! :)
Aug 18 2014
prev sibling next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 8/17/2014 5:57 AM, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Heh, couldn't have come at a better time. I *just* hit this little nugget of fun: Error 45: Too Much DEBUG Data for Old CodeView format
Aug 18 2014
parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig rejectedsoftware.com> writes:
Am 19.08.2014 03:25, schrieb Nick Sabalausky:
 On 8/17/2014 5:57 AM, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce
 list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.

 [1] https://github.com/D-Programming-Language/dmd/pull/3843
Heh, couldn't have come at a better time. I *just* hit this little nugget of fun: Error 45: Too Much DEBUG Data for Old CodeView format
I've been hitting that regularly in recent times, which is why I'm using this fix: https://github.com/DigitalMars/optlink/pull/15 It basically just disables the error message, so it would be good if Walter would comment on it. At least the error message seems to imply that the limit only exists for the older CodeView formats.
Aug 18 2014
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 17/08/14 11:57, Jacob Carlborg wrote:
 I though that this might be important enough to share on the announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support for Win32
 has recently been merged by Walter. It seems to be enabled using the
 -m32mscoff flag.
The runtime part has been merged now as well: https://github.com/D-Programming-Language/druntime/pull/928 -- /Jacob Carlborg
Aug 19 2014
parent reply "Szymon Gatner" <noemail gmail.com> writes:
On Tuesday, 19 August 2014 at 07:17:46 UTC, Jacob Carlborg wrote:
 On 17/08/14 11:57, Jacob Carlborg wrote:
 I though that this might be important enough to share on the 
 announce list:

 A pull request [1] by Rainer Schuetze which adds COFF support 
 for Win32
 has recently been merged by Walter. It seems to be enabled 
 using the
 -m32mscoff flag.
The runtime part has been merged now as well: https://github.com/D-Programming-Language/druntime/pull/928
Pardon my ignorance but does that mean that static library written in D could be used (linked) by 32bit program compiled with Visual Studio?
Aug 29 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 29/08/14 13:00, Szymon Gatner wrote:

 Pardon my ignorance but does that mean that static library written in D
 could be used (linked) by 32bit program compiled with Visual Studio?
Yes, as far as I understand it. -- /Jacob Carlborg
Aug 29 2014
parent reply "Szymon Gatner" <noemail gmail.com> writes:
On Friday, 29 August 2014 at 12:50:28 UTC, Jacob Carlborg wrote:
 On 29/08/14 13:00, Szymon Gatner wrote:

 Pardon my ignorance but does that mean that static library 
 written in D
 could be used (linked) by 32bit program compiled with Visual 
 Studio?
Yes, as far as I understand it.
If that is indeed the case then this is huge for me. I am doing 32bit Win apps and their iOS versions. The moment I will be able to use D libraries on both platforms I will totaly do it. In fact I want to be one of the very first to release paid iOS app with D code in it ;)
Aug 29 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-08-29 16:06, Szymon Gatner wrote:

 If that is indeed the case then this is huge for me. I am doing 32bit
 Win apps and their iOS versions. The moment I will be able to use D
 libraries on both platforms I will totaly do it. In fact I want to be
 one of the very first to release paid iOS app with D code in it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43 -- /Jacob Carlborg
Aug 29 2014
next sibling parent reply Andrej Mitrovic via Digitalmars-d-announce writes:
On 8/29/14, Jacob Carlborg via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:
 On 2014-08-29 16:06, Szymon Gatner wrote:

 If that is indeed the case then this is huge for me. I am doing 32bit
 Win apps and their iOS versions. The moment I will be able to use D
 libraries on both platforms I will totaly do it. In fact I want to be
 one of the very first to release paid iOS app with D code in it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43
There are so many amazing new features coming along for D lately. :) Keep it up!
 --
 /Jacob Carlborg
Aug 29 2014
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/29/14, 9:40 AM, Andrej Mitrovic via Digitalmars-d-announce wrote:
 On 8/29/14, Jacob Carlborg via Digitalmars-d-announce
 <digitalmars-d-announce puremagic.com> wrote:
 On 2014-08-29 16:06, Szymon Gatner wrote:

 If that is indeed the case then this is huge for me. I am doing 32bit
 Win apps and their iOS versions. The moment I will be able to use D
 libraries on both platforms I will totaly do it. In fact I want to be
 one of the very first to release paid iOS app with D code in it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43
There are so many amazing new features coming along for D lately. :) Keep it up!
Things are really happening folks. Andrei
Aug 29 2014
prev sibling next sibling parent reply "Szymon Gatner" <noemail gmail.com> writes:
On Friday, 29 August 2014 at 15:46:33 UTC, Jacob Carlborg wrote:
 On 2014-08-29 16:06, Szymon Gatner wrote:

 If that is indeed the case then this is huge for me. I am 
 doing 32bit
 Win apps and their iOS versions. The moment I will be able to 
 use D
 libraries on both platforms I will totaly do it. In fact I 
 want to be
 one of the very first to release paid iOS app with D code in 
 it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43
Wow, that is great news! Thanks for this awesome work. How does that relate to C++ on iOS? My apps are 99,8% C++ with some minimal Obj-C when necessary.
Aug 29 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-08-29 19:16, Szymon Gatner wrote:

 Wow, that is great news! Thanks for this awesome work. How does that
 relate to C++ on iOS? My apps are 99,8% C++ with some minimal Obj-C when
 necessary.
It's unrelated to C++. D is currently ABI compatible with C++ and if that works on OS X (I assume it does) it should work on iOS too. -- /Jacob Carlborg
Aug 29 2014
parent reply "Szymon Gatner" <noemail gmail.com> writes:
On Friday, 29 August 2014 at 19:54:04 UTC, Jacob Carlborg wrote:
 On 2014-08-29 19:16, Szymon Gatner wrote:

 Wow, that is great news! Thanks for this awesome work. How 
 does that
 relate to C++ on iOS? My apps are 99,8% C++ with some minimal 
 Obj-C when
 necessary.
It's unrelated to C++. D is currently ABI compatible with C++ and if that works on OS X (I assume it does) it should work on iOS too.
But there is still a matter of ARM/iOS runtime correct? Those merges will go to 2.067?
Aug 29 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-08-30 00:40, Szymon Gatner wrote:

 But there is still a matter of ARM/iOS runtime correct?
Yes, but that is nothing I'm working on. Although other people are working on that.
 Those merges will go to 2.067?
I have no idea. -- /Jacob Carlborg
Aug 30 2014
prev sibling next sibling parent reply "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> writes:
On Friday, 29 August 2014 at 15:46:33 UTC, Jacob Carlborg wrote:
 On 2014-08-29 16:06, Szymon Gatner wrote:

 If that is indeed the case then this is huge for me. I am 
 doing 32bit
 Win apps and their iOS versions. The moment I will be able to 
 use D
 libraries on both platforms I will totaly do it. In fact I 
 want to be
 one of the very first to release paid iOS app with D code in 
 it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43
I knew about this, but thought it had been abandoned. Great to see that it's alive, this is an important development!
Aug 29 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-08-29 20:35, "Marc Schütz" <schuetzm gmx.net>" wrote:

 I knew about this, but thought it had been abandoned. Great to see that
 it's alive, this is an important development!
I've been working on resurrecting the great work done by Michel Fortin. It's updated to 64bit and the modern runtime. It runs on OS X 32 and 64bit and should run on iOS with minor tweaks. -- /Jacob Carlborg
Aug 29 2014
prev sibling parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2014-08-29 15:46:32 +0000, Jacob Carlborg said:

 On 2014-08-29 16:06, Szymon Gatner wrote:
 
 If that is indeed the case then this is huge for me. I am doing 32bit
 Win apps and their iOS versions. The moment I will be able to use D
 libraries on both platforms I will totaly do it. In fact I want to be
 one of the very first to release paid iOS app with D code in it ;)
It's your luck day (almost). I'm working on making D ABI compatible with Objective-C [1]. It's mostly done, I'm working on merging latest changes. [1] http://wiki.dlang.org/DIP43
That's cool stuff. How will Swift influence this? I'm pretty sure that Apple's strategy is to get rid of Objective-C ASAP and use Swift whereever possible. -- Robert M. Münch Saphirion AG http://www.saphirion.com smarter | better | faster
Aug 30 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-08-30 14:31, Robert M. Münch wrote:

 That's cool stuff.

 How will Swift influence this? I'm pretty sure that Apple's strategy is
 to get rid of Objective-C ASAP and use Swift whereever possible.
Swift is ABI compatible with Objective-C. So anything that works across Swift and Objective-C should, in theory, work across Swift and D. -- /Jacob Carlborg
Aug 30 2014