Re: Which version of DMD does GDC 10 target

2020-08-20 Thread Mathias LANG via Digitalmars-d-learn

On Thursday, 20 August 2020 at 05:49:29 UTC, Arun wrote:

On Thursday, 20 August 2020 at 05:07:28 UTC, H. S. Teoh wrote:
On Thu, Aug 20, 2020 at 04:28:41AM +, Arun via 
Digitalmars-d-learn wrote:

Which version of DMD is GDC 10 based on?


Compile the following D program to find out:

-
static assert(0, "Compiler language version: " ~ 
__VERSION__.stringof);

-

I have this line in a file called langver.d, and whenever the 
exact language version isn't obvious, I compile it to find out 
the version. :-)  (And yes it deliberately asserts instead of 
using pragma(msg) so that I don't have to type -o- or -of- or 
-c or whatever to suppress actual code emission, just 
`$compiler langver.d`.)



--T


Nice trick. Thanks. For the benefit of others, GDC 10 is based 
on DMD 2.076. https://dlang.org/changelog/2.076.0.html


Side note, Using $() is better than `` for subshells, as it 
makes nesting much easier. ;-)


Side note: Usually a lot of bug fixes are backported to GDC, so 
even though it says 2.076 feature-wise, bugs that have been fixed 
much later might not be present.

Which is great because it makes bootstrapping *SO MUCH* easier.


Re: Which version of DMD does GDC 10 target

2020-08-19 Thread Arun via Digitalmars-d-learn

On Thursday, 20 August 2020 at 05:07:28 UTC, H. S. Teoh wrote:
On Thu, Aug 20, 2020 at 04:28:41AM +, Arun via 
Digitalmars-d-learn wrote:

Which version of DMD is GDC 10 based on?


Compile the following D program to find out:

-
static assert(0, "Compiler language version: " ~ 
__VERSION__.stringof);

-

I have this line in a file called langver.d, and whenever the 
exact language version isn't obvious, I compile it to find out 
the version. :-)  (And yes it deliberately asserts instead of 
using pragma(msg) so that I don't have to type -o- or -of- or 
-c or whatever to suppress actual code emission, just 
`$compiler langver.d`.)



--T


Nice trick. Thanks. For the benefit of others, GDC 10 is based on 
DMD 2.076. https://dlang.org/changelog/2.076.0.html


Side note, Using $() is better than `` for subshells, as it makes 
nesting much easier. ;-)


Re: Which version of DMD does GDC 10 target

2020-08-19 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Aug 20, 2020 at 04:28:41AM +, Arun via Digitalmars-d-learn wrote:
> Which version of DMD is GDC 10 based on?

Compile the following D program to find out:

-
static assert(0, "Compiler language version: " ~ __VERSION__.stringof);
-

I have this line in a file called langver.d, and whenever the exact
language version isn't obvious, I compile it to find out the version.
:-)  (And yes it deliberately asserts instead of using pragma(msg) so
that I don't have to type -o- or -of- or -c or whatever to suppress
actual code emission, just `$compiler langver.d`.)


--T


Which version of DMD does GDC 10 target

2020-08-19 Thread Arun via Digitalmars-d-learn

Which version of DMD is GDC 10 based on?

2020-08-19 19:36:17 ~/code/es-v2-d (master)
$ gdc --version
gdc (Ubuntu 10-20200411-0ubuntu1) 10.0.1 20200411 (experimental) 
[master revision 
bb87d5cc77d:75961caccb7:f883c46b4877f637e0fa5025b4d6b5c9040ec566]

Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.


2020-08-19 21:24:10 ~/code/es-v2-d (master)
$

LDC is smart enough to print the frontend version.

2020-08-19 21:25:39 ~/code/es-v2-d (master)
$ ldc2 --version
LDC - the LLVM D compiler (1.17.0):
  based on DMD v2.087.1 and LLVM 8.0.1
  built with LDC - the LLVM D compiler (1.17.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
aarch64- AArch64 (little endian)
aarch64_be - AArch64 (big endian)
arm- ARM
arm64  - ARM64 (little endian)
armeb  - ARM (big endian)
mips   - MIPS (32-bit big endian)
mips64 - MIPS (64-bit big endian)
mips64el   - MIPS (64-bit little endian)
mipsel - MIPS (32-bit little endian)
msp430 - MSP430 [experimental]
nvptx  - NVIDIA PTX 32-bit
nvptx64- NVIDIA PTX 64-bit
ppc32  - PowerPC 32
ppc64  - PowerPC 64
ppc64le- PowerPC 64 LE
riscv32- 32-bit RISC-V
riscv64- 64-bit RISC-V
thumb  - Thumb
thumbeb- Thumb (big endian)
wasm32 - WebAssembly 32-bit
wasm64 - WebAssembly 64-bit
x86- 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
2020-08-19 21:27:35 ~/code/es-v2-d (master)
$

--
Arun