github ldc-developers/ldc v1.25.0-beta1
LDC 1.25.0-beta1

latest releases: dmd-rewrite-v2.108.1, dmd-rewrite-v2.108.1-rc.1, v1.38.0-beta1...
pre-release3 years ago

Big news

  • Frontend, druntime and Phobos are at version 2.095.0+, incl. new command-line option -makedeps. (#3620)
  • LLVM for prebuilt packages bumped to v11.0.1. (#3639)
  • LDC invocations can now be nicely profiled via --ftime-trace. (#3624)
  • Struct TypeInfos are emitted into referencing object files only, and special TypeInfo member functions into the owning object file only. (#3491)
  • Windows:
    • New CI-automated Windows installer corresponding to the multilib package. (#3601)
    • Bundled MinGW-based libs bumped to MinGW-w64 v8.0.0. (#3605)
    • Bundled libcurl upgraded to v7.74.0. (#3638)
    • Breaking ABI changes:
      • extern(D): Pass non-PODs by ref to temporary. (#3612)
      • Win64: Pass/return delegates like slices - in (up to) 2 GP registers. (#3609)
      • Win64 extern(D): Pass/return Homogeneous Vector Aggregates in SIMD registers. (#3610)
  • -linkonce-templates comes with a new experimental template emission scheme and is now suited for projects consisting of multiple object files too. It's similar to C++, emitting templated symbols into each referencing compilation unit with optimizer-discardable linkonce_odr linkage. The consequences are manifold - each object file is self-sufficient wrt. templated symbols, naturally working around any template-culling bugs and also meaning increased opportunity for inlining and less need for LTO.
    The probably biggest advantage is that the optimizer can discard unused linkonce_odr symbols early instead of optimizing and forwarding to the assembler. So this is especially useful to decrease compilation times with -O and can at least in some scenarios greatly outweigh the (potentially very much) higher number of symbols defined by the glue layer - on my box, building optimized dub (all-at-once) is 28% faster with -linkonce-templates, and building the optimized Phobos unittests (per module) 56% faster.
    Libraries compiled with -linkonce-templates can generally not be linked against dependent code compiled without -linkonce-templates; the other way around works. (#3600)
  • Exploit ABI specifics with -preview=in. (#3578)

Platform support

  • Supports LLVM 6.0 - 11.0.

Bug fixes

  • Fix LTO with -link-internally. The prebuilt Windows packages don't bundle an external lld-link.exe LLD linker anymore. (#2657, #3604)
  • Add source location information for TypeInfo diagnostics with -betterC. (#3631, #3632)
  • Keep init symbols of built-in TypeInfo classes mutable just like any other TypeInfo, so that e.g. synchronized() can be used on the implicit monitor. (#3599)
  • Windows: Fix colliding EH TypeDescriptors for exceptions with the same TypeInfo_Class name. (#3501, #3614)
  • Predefine version FreeStanding when targeting bare-metal. (#3607, #3608)
  • druntime: Define rt.aaA.AA as naked pointer, no struct wrapper. (#3613)

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 to ld.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 to real members inside structs etc.

Don't miss a new ldc release

NewReleases is sending notifications on new releases.