www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Getting LDC version programmatically

reply torhu <torhu yahoo.com> writes:
Is there a way of getting the real LDC version number? 
`__VERSION__` is the corresponding DMD version even with LDC. 
Which also is useful, but not what I was looking for in this case.
Jan 14 2023
next sibling parent reply Sergey <kornburn yandex.ru> writes:
On Sunday, 15 January 2023 at 07:21:50 UTC, torhu wrote:
 Is there a way of getting the real LDC version number? 
 `__VERSION__` is the corresponding DMD version even with LDC. 
 Which also is useful, but not what I was looking for in this 
 case.
https://github.com/ldc-developers/ldc/blob/58ee56a2100eb301c55220933dd2a84d3a7d2843/driver/ldc-version.h LDC_VERSION probably what you want
Jan 15 2023
parent torhu <torhu yahoo.com> writes:
On Sunday, 15 January 2023 at 09:53:41 UTC, Sergey wrote:
 On Sunday, 15 January 2023 at 07:21:50 UTC, torhu wrote:
 Is there a way of getting the real LDC version number? 
 `__VERSION__` is the corresponding DMD version even with LDC. 
 Which also is useful, but not what I was looking for in this 
 case.
https://github.com/ldc-developers/ldc/blob/58ee56a2100eb301c55220933dd2a84d3a7d2843/driver/ldc-version.h LDC_VERSION probably what you want
How would I access that definition?
Jan 15 2023
prev sibling parent kinke <noone nowhere.com> writes:
On Sunday, 15 January 2023 at 07:21:50 UTC, torhu wrote:
 Is there a way of getting the real LDC version number? 
 `__VERSION__` is the corresponding DMD version even with LDC. 
 Which also is useful, but not what I was looking for in this 
 case.
D compilers don't expose their version, only the major+minor frontend version ('D version') as `__VERSION__`. The LDC minor version can be derived from that.
Jan 15 2023