Skip to content

Releases: ldc-developers/ldc

LDC 1.30.0-beta1

16 May 16:41
0448598
Compare
Choose a tag to compare
LDC 1.30.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.100.0. (#3970)
  • LLVM for prebuilt packages bumped to v14.0.3. (#3952, #3979)
    • All LLVM targets are enabled now (=> more targets for cross-compilation).
    • For the Mac package, the minimum supported macOS version has been raised to v10.12.
  • The minimum D version for bootstrapping has been raised to v2.079 (for GDC: v9.4), in line with DMD. (#3956)
  • The minimum LLVM version has been raised to v9.0. (#3960)
  • New prebuilt universal macOS package, runnable on both x86_64 and arm64, and enabling x86_64/arm64 macOS/iOS cross-compilation targets out of the box (-mtriple={x86_64,arm64}-apple-{macos,ios}). The x86_64 package doesn't bundle any arm64 libs anymore; the arm64 package newly bundles iOS libs (arm64). (#3958)

Platform support

  • Supports LLVM 9.0 - 14.0.

Internals

  • Main CI was moved from Azure Pipelines to GitHub Actions. Any fork on GitHub can trivially reuse the fully automated prebuilt packages generation & upload to a GitHub release. (#3978)

LDC 1.29.0

08 Apr 04:19
6aa350a
Compare
Choose a tag to compare

(Changes since 1.29.0-beta1 are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.099.1. (#3917, #3893, #3937, #3953) (new)
  • Support for LLVM 13 and 14. The prebuilt packages use v13.0.1. (#3842, #3951) (new)
  • On Linux, LDC doesn't default to the ld.gold linker anymore. The combination of LLVM 13+ and older gold linkers can apparently cause problems. We recommend using LLD, e.g., via -linker=lld or by setting your default /usr/bin/ld symlink; it's significantly faster too.
  • -linkonce-templates is less aggressive by default now and IMHO production-ready. (#3924)
  • When linking manually (not via LDC) against shared druntime, it is now required to link the bundled lib/ldc_rt.dso.o[bj] object file into each binary. It replaces the previously Windows-specific dso_windows.obj. (#3850)
  • Breaking extern(D) ABI change for all targets: formal parameters of non-variadic functions aren't reversed anymore, in line with the spec. For 32-bit x86, the first parameter is accordingly now potentially passed in EAX, not the last one. So non-variadic extern(D) functions with multiple explicit parameters will break if expecting parameters in specific registers or stack slots, e.g., naked DMD-style inline assembly. (#3873, ldc-developers/phobos@3d725fc)

Platform support

  • Supports LLVM 6.0 - 14.0. (new)
  • Basic compiler support for Newlib targets, i.e., triples like arm-none-newlibeabi. (#3946) (new)

Bug fixes

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)

LDC 1.29.0-beta1

10 Mar 13:24
3c29830
Compare
Choose a tag to compare
LDC 1.29.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.099.0+. (#3917, #3893, #3937)
  • Support for LLVM 13. The prebuilt packages use v13.0.1. (#3842)
  • On Linux, LDC doesn't default to the ld.gold linker anymore. The combination of LLVM 13 and older gold linkers can apparently cause problems. We recommend using LLD, e.g., via -linker=lld or by setting your default /usr/bin/ld symlink; it's significantly faster too.
  • -linkonce-templates is less aggressive by default now and IMHO production-ready. (#3924)
  • When linking manually (not via LDC) against shared druntime, it is now required to link the bundled lib/ldc_rt.dso.o[bj] object file into each binary. It replaces the previously Windows-specific dso_windows.obj. (#3850)
  • Breaking extern(D) ABI change for all targets: formal parameters of non-variadic functions aren't reversed anymore, in line with the spec. For 32-bit x86, the first parameter is accordingly now potentially passed in EAX, not the last one. So non-variadic extern(D) functions with multiple explicit parameters will break if expecting parameters in specific registers or stack slots, e.g., naked DMD-style inline assembly. (#3873, ldc-developers/phobos@3d725fc)

Bug fixes

Supported LLVM versions

  • 6.0 up to 13.0.

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)

LDC 1.28.1

13 Jan 14:22
Compare
Choose a tag to compare

Big news

  • Frontend, druntime and Phobos are at version 2.098.1+. (#3886, #3896)
  • New @hidden UDA (as counterpart of export). (#3855)
  • Support 'raw mangles' via leading \1 in pragma(mangle) strings, e.g., to access magic linker symbols on Mac. (#3854)
  • New @noSanitize UDA to selectively disable sanitizer instrumentation of functions. (#3889)
  • WebAssembly: Larger default stack size (1 MB) and protection against stack overflow overwriting global memory. (#3882)

Bug fixes

LDC 1.28.0

19 Oct 22:33
6a240b6
Compare
Choose a tag to compare

(Changes since 1.28.0-beta1 are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.098.0+. (#3821, #3839, #3844, #3852) (new)
  • Windows: -dllimport=defaultLibsOnly (e.g., implied by -link-defaultlib-shared -fvisibility=hidden) doesn't require -linkonce-templates anymore. (#3816)
  • dcompute: Add support for OpenCL image I/O. (#3835) (new)

Platform support

  • Supports LLVM 6.0 - 12.0.

Bug fixes

  • Fix dynamic casts across binary boundaries (DLLs etc.). (dlang/druntime#3543)
  • Windows: Fix potentially wrongly caught exceptions due to non-unique TypeInfo_Class names. (#3520)
  • Don't silently ignore invalid external tool specifications. (#3841) (new)
  • LLVM v11.1: Add missing PGO ldc-profdata tool. (#3845) (new)

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.

LDC 1.28.0-beta1

25 Sep 20:04
f9ba172
Compare
Choose a tag to compare
LDC 1.28.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.098.0-beta.2+. (#3821, #3839)
  • Windows: -dllimport=defaultLibsOnly (e.g., implied by -link-defaultlib-shared -fvisibility=hidden) doesn't require -linkonce-templates anymore. (#3816)

Platform support

  • Supports LLVM 6.0 - 12.0.

Bug fixes

  • Fix dynamic casts across binary boundaries (DLLs etc.). (dlang/druntime#3543)
  • Windows: Fix potentially wrongly caught exceptions due to non-unique TypeInfo_Class names. (#3520)

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.

LDC 1.27.1

14 Aug 18:55
Compare
Choose a tag to compare

Big news

  • Frontend, druntime and Phobos are at version 2.097.2. (#3811)
  • Revamped and improved -ftime-trace implementation for compiler profiling/tracing, now excluding LLVM-internal traces, adding frontend memory tracing, source file location infos etc. (#3797)
  • An official prebuilt package for Linux AArch64 is available again after migrating from Shippable to Travis. (#3733)

Bug fixes

  • ICE for 64-bit targets with 32-bit pointer size. (#3802, #3808)
  • Implement core.atomic.pause() for some architectures. (#3806, #3807)

LDC 1.27.0

31 Jul 13:04
Compare
Choose a tag to compare

(Changes since 1.27.0-beta3 are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.097.1+. (#3741, #3770, #3771, #3790, #3794, #3796, #3799) (new)
  • LLVM for prebuilt packages bumped to v12.0.1, and Linux base image to Ubuntu 18.04. Unfortunately, the dynamic-compile (JIT) functionality is lost this way - it needs some more work to adapt to a newer LLVM API. (#3701, #3789)
  • Prebuilt packages now bundle reggae, a meta build tool to generate ninja/make build files for dub projects (and more). Building large projects with many dependencies can be significantly sped-up via parallelization and dependency tracking for incremental builds. (#3739)
    Basic usage, in a dub project dir (containing a dub.{sdl,json} file):
    reggae -b ninja|make --dc=ldc2   # only needed the first time or when adding source files
    ninja|make [-j<N>]
    
  • Greatly improved DLL support on Windows, making it almost as easy as on Posix:
    • -fvisibility=public now also affects Windows, exporting all defined symbols as on Posix, without explicit export visibility. Compiling a DLL with -shared now defaults to -fvisibility=public for consistency with Posix. (#3703)
    • This paved the way for druntime and Phobos DLLs, now bundled with prebuilt Windows packages and linkable via -link-defaultlib-shared (default with -shared, consistent with Posix targets). Previous hacks to partially accomodate for multiple, statically linked druntimes and Phobos in a single process (GC proxy etc.) aren't required any longer. With -link-defaultlib-shared, LDC now defaults to -mscrtlib=msvcrt, linking against the shared MSVC runtime. (ldc-developers/druntime#197, #3704, ldc-developers/druntime#198)
    • Limitation: TLS variables cannot be accessed directly across DLL boundaries. This can be worked around with an accessor function, e.g., ldc-developers/druntime@5d3e21a35d.
    • Non-TLS extern(D) global variables not defined in a root module are dllimported (with -fvisibility=public, or - restricted to druntime/Phobos symbols - with -link-defaultlib-shared). Compiling all modules of a DLL at once thus avoids linker warnings about 'importing locally defined symbol'. When linking a DLL against a static library, the static library may likely need to be compiled with -fvisibility=public to make its globals importable from the DLL. There's a new -dllimport option for explicit control. (#3763)
    • Caveat: symbols aren't uniqued across the whole process, so can be defined in multiple DLLs/executables, each with their own address, so you cannot rely on TypeInfos, instantiated symbols and functions to have the same address for the whole process.
    • When linking manually (not via LDC), binaries linked against druntime DLL need to include new lib\dso_windows.obj.
    • To restore the previous behavior of -shared, add -fvisibility=hidden -link-defaultlib-shared=false.
  • Windows: ANSI color codes can now be enforced for redirected stderr via -enable-color. (#3744)
  • Prebuilt Linux and Mac packages now use the mimalloc allocator, significantly increasing compiler performance in some cases. (#3758, #3759)
  • The prebuilt macOS x64 package now bundles shared druntime/Phobos libs for iOS too. (#3764)
  • Possibly more performant shared Phobos library by compiling to a single object file with implicit cross-module inlining. (#3757)
  • New -cov-increment option for more performant coverage count execution. (#3724)
  • -fsanitize=memory: Bundle according LLVM compiler-rt library and add new -fsanitize-memory-track-origins option. (#3751)
  • New LDC-specific language addition: __traits(initSymbol, <aggregate type>) with semantics equivalent to TypeInfo.initializer(), but circumventing the TypeInfo indirection and thus e.g. also usable for -betterC code. (#3774, ldc-developers/druntime#201)

Platform support

  • Supports LLVM 6.0 - 12.0.

Bug fixes

  • Fix debuginfo source file paths, e.g., including directories in exception stack traces. (#3687)
  • Fix potentially corrupt context pointers for nested functions with -linkonce-templates. (#3690, #3766)
  • Predefine version CppRuntime_Gcc for musl targets. (#3769)
  • RVO: In-place construct <temporary>.__ctor(<args>). (#3778, #3779)
  • -linkonce-templates: Make sure special struct TypeInfo members are semantically analyzed before emitting the TypeInfo. (#3783)

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.

LDC 1.27.0-beta3

14 Jul 18:38
f313d26
Compare
Choose a tag to compare
LDC 1.27.0-beta3 Pre-release
Pre-release

(Changes since 1.27.0-beta2 are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.097.1-beta1+. (#3741, #3770, #3771, #3790) (new)
  • LLVM for prebuilt packages bumped to v12.0.1, and Linux base image to Ubuntu 18.04. Unfortunately, the dynamic-compile (JIT) functionality is lost this way - it needs some more work to adapt to a newer LLVM API. (#3701, #3789) (new)
  • Prebuilt packages now bundle reggae, a meta build tool to generate ninja/make build files for dub projects (and more). Building large projects with many dependencies can be significantly sped-up via parallelization and dependency tracking for incremental builds. (#3739)
    Basic usage, in a dub project dir (containing a dub.{sdl,json} file):
    reggae -b ninja|make --dc=ldc2   # only needed the first time or when adding source files
    ninja|make [-j<N>]
    
  • Greatly improved DLL support on Windows, making it almost as easy as on Posix:
    • -fvisibility=public now also affects Windows, exporting all defined symbols as on Posix, without explicit export visibility. Compiling a DLL with -shared now defaults to -fvisibility=public for consistency with Posix. (#3703)
    • This paved the way for druntime and Phobos DLLs, now bundled with prebuilt Windows packages and linkable via -link-defaultlib-shared (default with -shared, consistent with Posix targets). Previous hacks to partially accomodate for multiple, statically linked druntimes and Phobos in a single process (GC proxy etc.) aren't required any longer. With -link-defaultlib-shared, LDC now defaults to -mscrtlib=msvcrt, linking against the shared MSVC runtime. (ldc-developers/druntime#197, #3704, ldc-developers/druntime#198)
    • Limitation: TLS variables cannot be accessed directly across DLL boundaries. This can be worked around with an accessor function, e.g., ldc-developers/druntime@5d3e21a35d.
    • Non-TLS extern(D) global variables not defined in a root module are dllimported (with -fvisibility=public, or - restricted to druntime/Phobos symbols - with -link-defaultlib-shared). Compiling all modules of a DLL at once thus avoids linker warnings about 'importing locally defined symbol'. When linking a DLL against a static library, the static library may likely need to be compiled with -fvisibility=public to make its globals importable from the DLL. There's a new -dllimport option for explicit control. (#3763)
    • Caveat: symbols aren't uniqued across the whole process, so can be defined in multiple DLLs/executables, each with their own address, so you cannot rely on TypeInfos, instantiated symbols and functions to have the same address for the whole process.
    • When linking manually (not via LDC), binaries linked against druntime DLL need to include new lib\dso_windows.obj.
    • To restore the previous behavior of -shared, add -fvisibility=hidden -link-defaultlib-shared=false.
  • Windows: ANSI color codes can now be enforced for redirected stderr via -enable-color. (#3744)
  • Prebuilt Linux and Mac packages now use the mimalloc allocator, significantly increasing compiler performance in some cases. (#3758, #3759)
  • The prebuilt macOS x64 package now bundles shared druntime/Phobos libs for iOS too. (#3764)
  • Possibly more performant shared Phobos library by compiling to a single object file with implicit cross-module inlining. (#3757)
  • New -cov-increment option for more performant coverage count execution. (#3724)
  • -fsanitize=memory: Bundle according LLVM compiler-rt library and add new -fsanitize-memory-track-origins option. (#3751)
  • New LDC-specific language addition: __traits(initSymbol, <aggregate type>) with semantics equivalent to TypeInfo.initializer(), but circumventing the TypeInfo indirection and thus e.g. also usable for -betterC code. (#3774, ldc-developers/druntime#201) (new)

Platform support

  • Supports LLVM 6.0 - 12.0.

Bug fixes

  • Fix debuginfo source file paths, e.g., including directories in exception stack traces. (#3687)
  • Fix potentially corrupt context pointers for nested functions with -linkonce-templates. (#3690, #3766)
  • Predefine version CppRuntime_Gcc for musl targets. (#3769)
  • RVO: In-place construct <temporary>.__ctor(<args>). (#3778, #3779) (new)
  • -linkonce-templates: Make sure special struct TypeInfo members are semantically analyzed before emitting the TypeInfo. (#3783) (new)

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.

LDC 1.27.0-beta2

24 Jun 21:24
383129c
Compare
Choose a tag to compare
LDC 1.27.0-beta2 Pre-release
Pre-release

(Changes since 1.27.0-beta1 are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.097.0+. (#3741, #3770, #3771) (new)
  • LLVM for prebuilt packages bumped to v12.0.0, and Linux base image to Ubuntu 18.04. Unfortunately, the dynamic-compile (JIT) functionality is lost this way - it needs some more work to adapt to a newer LLVM API. (#3701)
  • Prebuilt packages now bundle reggae, a meta build tool to generate ninja/make build files for dub projects (and more). Building large projects with many dependencies can be significantly sped-up via parallelization and dependency tracking for incremental builds. (#3739)
    Basic usage, in a dub project dir (containing a dub.{sdl,json} file):
    reggae -b ninja|make --dc=ldc2   # only needed the first time or when adding source files
    ninja|make [-j<N>]
    
  • Greatly improved DLL support on Windows, making it almost as easy as on Posix:
    • -fvisibility=public now also affects Windows, exporting all defined symbols as on Posix, without explicit export visibility. Compiling a DLL with -shared now defaults to -fvisibility=public for consistency with Posix. (#3703)
    • This paved the way for druntime and Phobos DLLs, now bundled with prebuilt Windows packages and linkable via -link-defaultlib-shared (default with -shared, consistent with Posix targets). Previous hacks to partially accomodate for multiple, statically linked druntimes and Phobos in a single process (GC proxy etc.) aren't required any longer. With -link-defaultlib-shared, LDC now defaults to -mscrtlib=msvcrt, linking against the shared MSVC runtime. (ldc-developers/druntime#197, #3704, ldc-developers/druntime#198)
    • Limitation: TLS variables cannot be accessed directly across DLL boundaries. This can be worked around with an accessor function, e.g., ldc-developers/druntime@5d3e21a35d.
    • Non-TLS extern(D) global variables not defined in a root module are dllimported (with -fvisibility=public, or - restricted to druntime/Phobos symbols - with -link-defaultlib-shared). Compiling all modules of a DLL at once thus avoids linker warnings about 'importing locally defined symbol'. When linking a DLL against a static library, the static library may likely need to be compiled with -fvisibility=public to make its globals importable from the DLL. There's a new -dllimport option for explicit control. (#3763) (new)
    • Caveat: symbols aren't uniqued across the whole process, so can be defined in multiple DLLs/executables, each with their own address, so you cannot rely on TypeInfos, instantiated symbols and functions to have the same address for the whole process.
    • When linking manually (not via LDC), binaries linked against druntime DLL need to include new lib\dso_windows.obj.
    • To restore the previous behavior of -shared, add -fvisibility=hidden -link-defaultlib-shared=false.
  • Windows: ANSI color codes can now be enforced for redirected stderr via -enable-color. (#3744)
  • Prebuilt Linux and Mac packages now use the mimalloc allocator, significantly increasing compiler performance in some cases. (#3758, #3759) (new)
  • The prebuilt macOS x64 package now bundles shared druntime/Phobos libs for iOS too. (#3764) (new)
  • Possibly more performant shared Phobos library by compiling to a single object file with implicit cross-module inlining. (#3757) (new)
  • New -cov-increment option for more performant coverage count execution. (#3724) (new)
  • -fsanitize=memory: Bundle according LLVM compiler-rt library and add new -fsanitize-memory-track-origins option. (#3751) (new)

Platform support

  • Supports LLVM 6.0 - 12.0.

Bug fixes

  • Fix debuginfo source file paths, e.g., including directories in exception stack traces. (#3687)
  • Fix potentially corrupt context pointers for nested functions with -linkonce-templates. (#3690, #3766) (new)
  • Predefine version CppRuntime_Gcc for musl targets. (#3769) (new)
  • beta1 regression wrt. teardown of Windows DLLs with static druntime using the .exe GC. (#3755) (new)

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.