Jump to page: 1 2 3
Thread overview
X86_mscoff / x86_64 as default for dub projects (windows)
Dec 06, 2018
Andre Pany
Dec 06, 2018
Bastiaan Veelo
Dec 06, 2018
kinke
Dec 06, 2018
Jonathan M Davis
Dec 06, 2018
Basile B.
Dec 07, 2018
rikki cattermole
Dec 07, 2018
Andre Pany
Dec 07, 2018
Rubn
Dec 08, 2018
Jonathan M Davis
Dec 08, 2018
Rubn
Dec 08, 2018
Jonathan M Davis
Dec 20, 2018
Seb
Dec 07, 2018
Guillaume Piolat
Dec 07, 2018
Andre Pany
Dec 08, 2018
Guillaume Piolat
Dec 08, 2018
Andre Pany
Dec 19, 2018
Andre Pany
Dec 20, 2018
Andre Pany
Dec 25, 2018
Guillaume Piolat
Dec 07, 2018
Dennis
Dec 07, 2018
kinke
Dec 19, 2018
Atila Neves
Dec 19, 2018
Andre Pany
December 06, 2018
Hi,

This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?

To be pretty clear, you still can compile to x86 OMF by setting the default architecture either in settings.json or as command line argument. The proposal is just to set another default.

This is now possible as DMD and LDC comes with lld and the needed libraries.

Kind regards
Andre


December 06, 2018
On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
> Hi,
>
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?

I am om favour of this. It would help prevent people running into optlink problems such as this one: https://github.com/MartinNowak/scod/issues/4

Bastiaan.


December 06, 2018
On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
> Hi,
>
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>
> To be pretty clear, you still can compile to x86 OMF by setting the default architecture either in settings.json or as command line argument. The proposal is just to set another default.

I also think this is long overdue - but I wouldn't change dub's defaults, but DMD's instead (something like `-m32` on Windows meaning `-m32mscoff`, and a new `-m32omf` switch). It's a breaking change, but definitely worth it IMO. Besides optlink bugs and limitations, and the executable unfortunately being named `link.exe` and so conflicting with the MS one (and people running into problems when using LDC, depending on their PATH), I see the primary drawback in that probably > 99.9% of 3rd-party libraries out there are in COFF format (I haven't heard of that old OMF format from DOS times before playing with DMD).
December 06, 2018
On Thursday, December 6, 2018 10:58:17 AM MST Andre Pany via Digitalmars-d wrote:
> Hi,
>
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>
> To be pretty clear, you still can compile to x86 OMF by setting the default architecture either in settings.json or as command line argument. The proposal is just to set another default.
>
> This is now possible as DMD and LDC comes with lld and the needed libraries.

I'm inclined to argue that it's a bad idea given that it's not dmd's default. It risks being very confusing, and anyone who actually cares to make the change can easily set their dub configuration accordingly.

- Jonathan M Davis



December 06, 2018
On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
> Hi,
>
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>
> To be pretty clear, you still can compile to x86 OMF by setting the default architecture either in settings.json or as command line argument. The proposal is just to set another default.
>
> This is now possible as DMD and LDC comes with lld and the needed libraries.
>
> Kind regards
> Andre

I'd  wish this too (i also wish DWARF info in mscoff). Unfortunately last time i tried to built DCD using -m64 (and MINGW stuff + LLD) the resulting PE crashed, so maybe there are problems to fix before switching.
December 07, 2018
On 07/12/2018 11:50 AM, Basile B. wrote:
> On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
>> Hi,
>>
>> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>>
>> To be pretty clear, you still can compile to x86 OMF by setting the default architecture either in settings.json or as command line argument. The proposal is just to set another default.
>>
>> This is now possible as DMD and LDC comes with lld and the needed libraries.
>>
>> Kind regards
>> Andre
> 
> I'd  wish this too (i also wish DWARF info in mscoff). Unfortunately last time i tried to built DCD using -m64 (and MINGW stuff + LLD) the resulting PE crashed, so maybe there are problems to fix before switching.

Agreed we should hold off until mingw + lld stuff gain more maturity.
Then we can swap over fully with minimal pain.
December 07, 2018
On Friday, 7 December 2018 at 06:52:41 UTC, rikki cattermole wrote:
> On 07/12/2018 11:50 AM, Basile B. wrote:
>> 
>> I'd  wish this too (i also wish DWARF info in mscoff). Unfortunately last time i tried to built DCD using -m64 (and MINGW stuff + LLD) the resulting PE crashed, so maybe there are problems to fix before switching.
>
> Agreed we should hold off until mingw + lld stuff gain more maturity.
> Then we can swap over fully with minimal pain.

Thanks a lot for the opinions. Maybe we could check that e.g. all dub packages
compiles fine (and unittests succeeds) with LLD to check the maturity.
When we reached that level we can switch the default architecture.

I also like the idea to switch the architecture in DMD itself to avoid surprises.
And I really like to have a 64 bit DMD executable. Fortunately it is created
by the nightly builds, but having it as release download would be really great.

Kind regards
André

December 07, 2018
On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
> Hi,
>
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>

The problem is that DMD -m32 always works, else you need a _correct_ install of VS to build the other archs and it's not always _that_ easy to have when you did things in an order that wasn't exactly the one of the installer.

please, no.
December 07, 2018
On Friday, 7 December 2018 at 13:11:37 UTC, Guillaume Piolat wrote:
> On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
>> Hi,
>>
>> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?
>>
>
> The problem is that DMD -m32 always works, else you need a _correct_ install of VS to build the other archs and it's not always _that_ easy to have when you did things in an order that wasn't exactly the one of the installer.
>
> please, no.

Visual studio is no longer needed as lld and x86mscoff/x86_64 libraries now included in dmd and LDC:)

We just need to get it mature.

Kind regards
Andre
December 07, 2018
On Thursday, 6 December 2018 at 17:58:17 UTC, Andre Pany wrote:
> This is mostly interesting for windows developers. What is your opinion of switching to architecture x86_mscoff or x86_64 as default on windows?

My biggest gripe is this confusing matrix of compiler flags:

      default  -m32     -m32mscoff  -m64
dmd   OMF      OMF      COFF-32     COFF-64
ldc   COFF-64  COFF-32  Error       COFF-64

The same applies to dub's --arch flag.

Currently, the default works out of the box and I don't want to change that. I also don't like the idea of changing semantics and break code / expectations of users that way. Maybe we can make the current flags for dub/the compilers undocumented and define new, consistent flags.


« First   ‹ Prev
1 2 3