Big news
- Frontend, druntime and Phobos are at version 2.079.1, incl. new switches
-i[=<pattern>](include imports in compilation) and-Xi. (#2587)- Support a minimal (d)runtime. (#2641)
- Win32 breaking ABI change: add extra underscore for mangled names of D symbols. (#2598)
- No breaking ABI change for 64-bit macOS wrt. C++ mangling of D
(u)long. It's still mangled as C++(unsigned) longin order not to breaksize_tandptrdiff_tinterop, whereas DMD 2.079 mangles it as(unsigned) long long(which, in combination with missingcore.stdc.config.cpp_(u)long, makes it impossible to represent a C++ size_t/ptrdiff_t with DMD 2.079 on 64-bit macOS).
- Support for LLVM 6. It's used for the prebuilt packages, except for the 32-bit Windows package (due to #2629). (#2608)
- Integrated LLD (enable with
-link-internally) now also able to (cross-)link ELF and Mach-O binaries, in addition to the existing Windows COFF support. (#2203) - Prebuilt Linux and macOS packages now ship with LTO default libs (druntime & Phobos). Keep on using
-flto=<thin|full>to restrict LTO to your code, or opt for-flto=<thin|full> -defaultlib=phobos2-ldc-lto,druntime-ldc-ltoto include the default libs. (#2640) - When linking against shared default libs, LDC now sets a default rpath (absolute path to the LDC lib dir(s); configurable in the
etc/ldc2.conffile). (#2659) - Improved support for MIPS targets and the uClibc runtime library. Thanks Radu! (#2606, ldc-developers/phobos#62, ldc-developers/phobos#63, ldc-developers/druntime#134, ldc-developers/druntime#135)
- New convenience mixin for fuzzing:
ldc.libfuzzer.DefineTestOneInput. (#2510)
Platform support
- Supports LLVM 3.7 - 6.0.
- Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017.
- Android: A native 32-bit ARM package for the Termux app is included, install it with
dpkg -i ldc-beta_1.9.0_android-arm.deb. To cross-compile from a desktop OS, see the wiki.
Bug fixes
- DMD-style inline asm:
- macOS: Fix install_name and symlinks of shared fat druntime/Phobos libs. (#2659, #2615)
- Make
-staticoverride-link-defaultlib-shared. (#2646) - Make interface thunks forward variadic args. (#2613)
- Fix
va_arg()for PowerPC. (ldc-developers/druntime#121) - MSVC: Support exporting naked functions. (#2648)
- Only emit interface vtables in the declaring module. (#2647)
- Call
_Unwind_Resume()directly. (#2642)
Known issues
- LDC does not zero the padding area of a
realvariable. This may lead to wrong results if the padding area is also considered. See #770. Does not apply torealmembers inside structs etc. - Phobos does not compile on MinGW platform.
- ThinLTO may not work well with the
ld.bfdlinker, useld.goldinstead (-linker=gold).