DMD, LDC, and GDC compilers and 32/64 bit
David Nadlinger via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sun Jun 18 10:42:13 PDT 2017
On 18 Jun 2017, at 17:08, Russel Winder via digitalmars-d-ldc wrote:
> It appears at some time in the past that some of the compilers when
> compiled as 32-bit executables, could not generate 64-bit objects and
> executables as they did not understand the -m64 option, it was not
> compiled in.
Both -m32 and -m64 are available on any host with LDC. However, usually
you wouldn't find 64 bit standard libraries with a 32 bit build – not
because of any technical reason, but just because multilib setups in
that direction are far less useful/common.
> Is there a way to determine the bitsize of the compiler executable, in
> the test it is assumed that if the OS is 32-bit then so are the D
> compilers.
It seems both simpler and more accurate to just test whether "$DMD -m64
-main empty.d" (with an empty source file) succeeds.
— David
More information about the digitalmars-d-ldc
mailing list