digitalmars.D - DMD cross compiler
- Manu (10/10) Sep 01 2018 I know there's been discussion on this before, I just want a
- Joakim (5/19) Sep 01 2018 What specifically do you want to cross-compile to, something like
- Manu (3/24) Sep 01 2018 Yes, but we're talking about DMD...
- bauss (2/23) Sep 03 2018 Not everyone can or want to use LDC.
- Joakim (4/13) Sep 03 2018 Why not? If you're not optimizing or iterating on your code, it's
- Manu (5/19) Sep 03 2018 DMD is for iterating on DMD ;)
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (4/7) Sep 03 2018 What if you want to reproduce a bug that only happens when
- Iain Buclaw (3/11) Sep 03 2018 GDC is kept in sync with dmd nightlies on a weekly or twice-weekly basis...
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (3/5) Sep 03 2018 I saw the post about using the 2.081 frontend, but I didn't know
- bauss (2/16) Sep 03 2018 Sometimes all you got are a few hours when working professionally.
- Jacob Carlborg (5/19) Sep 03 2018 Yeah, I don't see a reason why DMD should not be a
- Manu (7/26) Sep 03 2018 Not being a cross-compiler makes iteration and testing unnecessarily
I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?
Sep 01 2018
On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all this, ie the one compiler cross-compiles to every other platform with a single flag, may just want to use it.
Sep 01 2018
On Sat, 1 Sep 2018 at 18:55, Joakim via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:Yes, but we're talking about DMD...I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all this, ie the one compiler cross-compiles to every other platform with a single flag, may just want to use it.
Sep 01 2018
On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote:On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:Not everyone can or want to use LDC.I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all this, ie the one compiler cross-compiles to every other platform with a single flag, may just want to use it.
Sep 03 2018
On Monday, 3 September 2018 at 09:21:21 UTC, bauss wrote:On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote:Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc.On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:Not everyone can or want to use LDC.[...]What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all this, ie the one compiler cross-compiles to every other platform with a single flag, may just want to use it.
Sep 03 2018
On Mon, 3 Sep 2018 at 02:35, Joakim via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Monday, 3 September 2018 at 09:21:21 UTC, bauss wrote:DMD is for iterating on DMD ;) Making DMD patches in LDC and then pushing upstream is much more of a hassle. DMD build/iteration time is super fast too.On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote:Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc.On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:Not everyone can or want to use LDC.[...]What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all this, ie the one compiler cross-compiles to every other platform with a single flag, may just want to use it.
Sep 03 2018
On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote:Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc.What if you want to reproduce a bug that only happens when compiling with dmd for some weird reason ? Or what if you want to use the very latest features from dmd nightlies ?
Sep 03 2018
On 3 September 2018 at 15:12, Laurent Tréguier via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote:GDC is kept in sync with dmd nightlies on a weekly or twice-weekly basis.Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc.What if you want to reproduce a bug that only happens when compiling with dmd for some weird reason ? Or what if you want to use the very latest features from dmd nightlies ?
Sep 03 2018
On Monday, 3 September 2018 at 14:00:58 UTC, Iain Buclaw wrote:GDC is kept in sync with dmd nightlies on a weekly or twice-weekly basis.I saw the post about using the 2.081 frontend, but I didn't know about that. That's great, thanks for the info !
Sep 03 2018
On Monday, 3 September 2018 at 14:00:58 UTC, Iain Buclaw wrote:On 3 September 2018 at 15:12, Laurent Tréguier via Digitalmars-d <digitalmars-d puremagic.com> wrote:Sometimes all you got are a few hours when working professionally.On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote:GDC is kept in sync with dmd nightlies on a weekly or twice-weekly basis.Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc.What if you want to reproduce a bug that only happens when compiling with dmd for some weird reason ? Or what if you want to use the very latest features from dmd nightlies ?
Sep 03 2018
On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?Yeah, I don't see a reason why DMD should not be a cross-compiler. I've been thinking the same thing as well. -- /Jacob Carlborg
Sep 03 2018
On Mon, 3 Sep 2018 at 01:40, Jacob Carlborg via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote:Not being a cross-compiler makes iteration and testing unnecessarily hard and slow. We should try and reduce friction to developing DMD. Not being a cross-compiler has definitely stopped me on multiple instances on account of "ah, it's all just too hard!".I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's pretty much it. When hacking on parts of DMD, I frequently make hacks that turn such versions into runtime if's to test multiple targets from the one dev workflow. It would be about 100 times more convenient to supply an arg, than make hacks all over the code... so, why not?Yeah, I don't see a reason why DMD should not be a cross-compiler. I've been thinking the same thing as well.
Sep 03 2018