Thread overview
Why is LDC built with old version of LDC
Jul 20, 2019
Dennis Cote
Jul 21, 2019
Nicholas Wilson
Jul 21, 2019
Johan Engelen
July 20, 2019
I'm just curious if there is a good reason why LDC is built with an old version of LDC? LDC reports the following using the --version option

 Jul 20 13:23:42 on ttys000
Denniss-iMac:~ dennis$ ldc2 --version
LDC - the LLVM D compiler (1.16.0):
  based on DMD v2.086.1 and LLVM 8.0.0
  built with LDC - the LLVM D compiler (1.12.0)
  Default target: x86_64-apple-darwin18.6.0
  Host CPU: skylake
  http://dlang.org - http://wiki.dlang.org/LDC

Why is version 1.16.0 built using version 1.12.0? Could the build tools not bootstrap the compiler using 1.12.0, and then recompile the source for version 1.16.0 using the version 1.16.0 compiler built using the older compiler?


July 21, 2019
On Saturday, 20 July 2019 at 19:34:35 UTC, Dennis Cote wrote:
> I'm just curious if there is a good reason why LDC is built with an old version of LDC? LDC reports the following using the --version option
>
>  Jul 20 13:23:42 on ttys000
> Denniss-iMac:~ dennis$ ldc2 --version
> LDC - the LLVM D compiler (1.16.0):
>   based on DMD v2.086.1 and LLVM 8.0.0
>   built with LDC - the LLVM D compiler (1.12.0)
>   Default target: x86_64-apple-darwin18.6.0
>   Host CPU: skylake
>   http://dlang.org - http://wiki.dlang.org/LDC
>
> Why is version 1.16.0 built using version 1.12.0? Could the build tools not bootstrap the compiler using 1.12.0, and then recompile the source for version 1.16.0 using the version 1.16.0 compiler built using the older compiler?

Probably because that corresponds to the minimum version that the frontend requires to build itself (which I think is 2.079). It definitely could be built with itself, theres nothing stopping that from happening.
July 21, 2019
On Saturday, 20 July 2019 at 19:34:35 UTC, Dennis Cote wrote:
> I'm just curious if there is a good reason why LDC is built with an old version of LDC? LDC reports the following using the --version option
>
>  Jul 20 13:23:42 on ttys000
> Denniss-iMac:~ dennis$ ldc2 --version
> LDC - the LLVM D compiler (1.16.0):
>   based on DMD v2.086.1 and LLVM 8.0.0
>   built with LDC - the LLVM D compiler (1.12.0)
>   Default target: x86_64-apple-darwin18.6.0
>   Host CPU: skylake
>   http://dlang.org - http://wiki.dlang.org/LDC
>
> Why is version 1.16.0 built using version 1.12.0? Could the build tools not bootstrap the compiler using 1.12.0, and then recompile the source for version 1.16.0 using the version 1.16.0 compiler built using the older compiler?

This depends on where you get the compiler from. The official release packages feature LDC compiled with itself (exactly as what you are suggesting).

-Johan