LDC 1.22.0-beta1
Pre-release
Pre-release
Big news
- Frontend, druntime and Phobos are at version 2.092.0+. (#3413, #3416, #3429, #3434)
- AArch64: All known ABI issues have been fixed. C(++) interop should now be on par with x86_64, and variadics usable with
core.{vararg,stdc.stdarg}
. (#3421) - Windows hosts: DMD's Visual C++ toolchain detection has been adopted. As that's orders of magnitude faster than the previous method involving the MS batch file, auto-detection has been enabled by default, so if you have a non-ancient Visual C++ installation, it will now be used automatically for linking. The environment setup has been reduced to the bare minimum (
LIB
andPATH
). (#3415) - Link-time overridable
@weak
functions are now emulated for Windows targets and work properly for ELF platforms. For ELF, LDC doesn't emit any COMDATs anymore. (#3424) - New
ldc.gccbuiltins_{amdgcn,nvvm}
for AMD GCN and NVIDIA PTX targets. (#3411)
Platform support
- Supports LLVM 3.9 - 10.0.
Bug fixes
- Casting (static and dynamic) arrays to vectors now loads the data instead of splatting the first element. (#3418, #3419)
- Fix return statements potentially accessing memory from destructed temporaries. (#3426)
- Add proper support for
-checkaction=halt
. (#3430, #3431)
Internals
- When printing compile-time reals to hex strings (mangling, .di headers), LDC now uses LLVM instead of the host C runtime, for proper and consistent results. (#3410)
- One limitation for exotic hosts wrt. C
long double
precision has been lifted. (#3414) - For AVR targets, the compiler now predefines
AVR
and emits all TLS globals as regular__gshared
ones. (#3420)
Known issues
- When building LDC, old LDC 0.17.*/ltsmaster host compilers miscompile LDC ≥ 1.21, leading to potential segfaults of the built LDC. Ltsmaster can still be used to bootstrap a first compiler and then let that compiler compile itself. (#3354)
- Buggy older
ld.bfd
linker versions may wrongly strip out required symbols, e.g., ModuleInfos (so that e.g. no module ctors/dtors are run). LDC defaults told.gold
on Linux. - LDC does not zero the padding area of a
real
variable. This may lead to wrong results if the padding area is also considered. See #770. Does not apply toreal
members inside structs etc.