Releases: ldc-developers/ldc
Releases · ldc-developers/ldc
LDC 1.27.0-beta1
Big news
- Frontend, druntime and Phobos are at version 2.097.0. (#3741)
- 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 adub.{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 explicitexport
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 aredllimport
ed (with either-fvisibility=public
or-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. - 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)
Platform support
- Supports LLVM 6.0 - 12.0.
Bug fixes
- Fix debuginfo source file paths, e.g., including directories in exception stack traces. (#3687)
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.
LDC 1.26.0
(Changes since 1.26.0-beta1 are marked with (new).)
Big news
- Frontend, druntime and Phobos are at version 2.096.1+, incl. new
ldmd2
command-line option-gdwarf=<version>
(use-dwarf-version
forldc2
). (#3678, #3706) (new)
Platform support
- Supports LLVM 6.0 - 12.0.
Bug fixes
- v1.25 regression: TypeInfo for interface gives invalid string for name. (#3693)
- Make enums show up correctly as members of a struct when debugging. (#3688, #3694)
- Some new GCC builtins are available in
ldc.gccbuiltins_*
, by not rejecting LLVMi1
anymore (mapping to Dbool
instead). Thanks Bruce! (#3682) - dcompute: Don't reject CUDA versions 7.x - 8.0.0. (#3683)
- Don't enforce the frame pointer for functions with GCC-style inline asm. (#3685)
-i
: Excludeldc.*
modules by default. (#3679)- Fix some cases of insufficient alignment for arguments and parameters. (#3692, #3698) (new)
- Fix a few issues with LLVM 12. (#3697, #3708) (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 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.
LDC 1.26.0-beta1
Big news
- Frontend, druntime and Phobos are at version 2.096.0+, incl. new
ldmd2
command-line option-gdwarf=<version>
(use-dwarf-version
forldc2
). (#3678)
Platform support
- Supports LLVM 6.0 - 12.0.
Bug fixes
- v1.25 regression: TypeInfo for interface gives invalid string for name. (#3693)
- Make enums show up correctly as members of a struct when debugging. (#3688, #3694)
- Some new GCC builtins are available in
ldc.gccbuiltins_*
, by not rejecting LLVMi1
anymore (mapping to Dbool
instead). Thanks Bruce! (#3682) - dcompute: Don't reject CUDA versions 7.x - 8.0.0. (#3683)
- Don't enforce the frame pointer for functions with GCC-style inline asm. (#3685)
-i
: Excludeldc.*
modules by default. (#3679)
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.
LDC 1.25.1
Bug fixes
- druntime: Fix DWARF backtrace segfault regression in case the executable file cannot be opened. (#3677, dlang/druntime#3382)
LDC 1.25.0
(Changes since 1.25.0-beta1 are marked with (new).)
Big news
- Frontend, druntime and Phobos are at version 2.095.1, incl. new command-line option
-makedeps
. (#3620, #3658, #3668) (new) - Support for LLVM 12 and LLVM 11.1. (#3663, ldc-developers/druntime#195) (new)
- LLVM for prebuilt packages bumped to v11.0.1. (#3639)
- New prebuilt package for native macOS/arm64 ('Apple silicon'). (#3666) (new)
- 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:
-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-discardablelinkonce_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 unusedlinkonce_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)- Emit function/delegate literals as
linkonce_odr
, as they are emitted into each referencing compilation unit too. (#3650) (new) - Exploit ABI specifics with
-preview=in
. (#3578) - Musl: Switch to cherry-picked libunwind-based backtrace alternative. (#3641, ldc-developers/druntime#192) (new)
Platform support
- Supports LLVM 6.0 - 12.0. (new)
Bug fixes
- Fix LTO with
-link-internally
. The prebuilt Windows packages don't bundle an externallld-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) - Misc. fixes and improvements for the CMake scripts, incl. new defaults for
LDC_INSTALL_{LTOPLUGIN,LLVM_RUNTIME_LIBS}
. (#3647, #3655, #3654, #3673) (new) -cleanup-obj
: Put object files into unique temporary directory by default. (#3643, #3660) (new)- druntime: Add missing
core.atomic.atomicFetch{Add,Sub}
. (#3646, ldc-developers/druntime#193) (new) - Fix regression wrt. non-deleted temporary
-run
executable. (#3636) (new)
Internals
- Ignore
-enable-cross-module-inlining
if inlining is generally disabled. (#3664) (new) - Travis CI ported to GitHub Actions (excl. Linux/AArch64). (#3661, #3662) (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 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.
LDC 1.25.0-beta1
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:
-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-discardablelinkonce_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 unusedlinkonce_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 externallld-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 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.
LDC 1.24.0
(Changes since 1.24.0-beta1 are marked with (new).)
Big news
- Frontend, druntime and Phobos are at version 2.094.1+, incl. new command-line options
-cov=ctfe
,-vtemplates=list-instances
and-HC=<silent|verbose>
. (#3560, #3582, #3588, #3593) (new) - Support for LLVM 11. The prebuilt packages use v11.0.0; x86 packages newly include the LLVM backend for AMD GPUs. (#3546, #3586) (new)
- Experimental support for macOS on 64-bit ARM, thanks Guillaume! All druntime/Phobos unit tests pass. The macOS package includes prebuilt druntime/Phobos; adapt the SDK path in
etc/ldc2.conf
and then use-mtriple=arm64-apple-macos
to cross-compile. If you know how to work around the countless linker warnings, please let us know. (dlang/druntime#3226, #3583) (new)
Platform support
- Supports LLVM 6.0 - 11.0.
Bug fixes
- Fix potentially wrong context pointers when calling delegate literals. (#3553, #3554)
- Fix alignment issue when casting vector rvalue to static array. (c8889a9)
- Make sure lambdas in
pragma(inline, true)
functions are emitted into each referencing compilation unit. (#3570) - Fix
-Xcc=-Wl,...
by dropping support for comma-separated list ofcc
options. (c61b135) (new) - Fix ThreadSanitizer support by not detaching main thread upon program termination. (#3572) (new)
- Traverse full chain of nested aggregates when resolving a nested variable. (#3556, #3558) (new)
Internals
- CI: Linux AArch64 is now also tested by a Travis job, because Shippable has sadly become unreliable. (#3469)
- Building LDC with an LDC host compiler might be somewhat faster now (requires
-DLDC_LINK_MANUALLY=OFF
in the CMake command-line on non-Windows hosts). (#3575) (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 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.
LDC 1.24.0-beta1
Big news
- Frontend, druntime and Phobos are at version 2.094.0+, incl. new command-line options
-cov=ctfe
,-vtemplates=list-instances
and-HC=<silent|verbose>
. (#3560) - Support for LLVM 11; the prebuilt packages use a very recent build (v11.0.0-rc4+) as LLVM 11 hasn't been finalized yet. The prebuilt x86 packages newly include the LLVM backend for AMD GPUs. (#3546)
Platform support
- Supports LLVM 6.0 - 11.0.
Bug fixes
- Fix potentially wrong context pointers when calling delegate literals. (#3553, #3554)
- Fix alignment issue when casting vector rvalue to static array. (c8889a9)
- Make sure lambdas in
pragma(inline, true)
functions are emitted into each referencing compilation unit. (#3570)
Internals
- CI: Linux AArch64 is now also tested by a Travis job, because Shippable has sadly become unreliable. (#3469)
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.
LDC 1.23.0
(Changes since 1.23.0-beta1 are marked with (new).)
Big news
- Frontend, druntime and Phobos are at version 2.093.1+, incl. new command-line option
-vtemplates
. (#3476, #3538, #3541) (new) - Min required LLVM version raised to v6.0, dropping support for v3.9-5.0. (#3493)
- LLVM for prebuilt packages bumped to v10.0.1. (#3513) (new)
- The prebuilt Mac package now also includes prebuilt druntime/Phobos for the iOS/x86_64 simulator, making cross-compilation work out of the box with
-mtriple=x86_64-apple-ios12.0
. (#3478) - Windows: New
-gdwarf
CLI option to emit DWARF debuginfos for MSVC targets, e.g., for debugging with gdb/lldb. (#3533) (new) - New
-platformlib
CLI option to override the default linked-with platform libraries, e.g., when targeting bare-metal. (#3374, #3475) (new)
Platform support
- Supports LLVM 6.0 - 10.0.
Bug fixes
- Fix regression since v1.22: shared druntime potentially overriding libstdc++ symbols and breaking exceptions in C++ libraries. (#3530, #3537) (new)
- Fix naked DMD-style asm emission for non-Mac x86 Darwin targets (e.g., iOS simulators). (#3478)
-betterC
: Don't use unsupported EH for handling clean-ups. (#3479, #3482)- dcompute: Fix wrong address space loads and stores. Thx Rob! (#3428)
- Fix ICE wrt. missing IR declarations for some forward-declared functions. (#3496, #3503)
- Fix ICE wrt. inline IR and empty parameter types tuple. (#3509) (new)
- Fix PGO issues. (#3375, #3511, #3512, #3524) (new)
- Improve support for LLVM's ThreadSanitizer. (#3522) (new)
- Fix linker cmdline length limitation via response files. (#3535, #3536) (new)
Internals
- Compiler performance wrt. string literals emission has been improved. Thx @looked-at-me! (#3490, #3492)
- Link libstdc++ statically for
libldc-jit.so
of prebuilt Linux packages, to increase portability. (#3473, #3474) - Set up Visual D when using the Visual Studio CMake generator, making LDC compiler development on Windows a smooth out-of-the-box experience. (#3494)
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.
LDC 1.23.0-beta1
Big news
- Frontend, druntime and Phobos are at version 2.093.0+, incl. new command-line option
-vtemplates
. (#3476) - Min required LLVM version raised to v6.0, dropping support for v3.9-5.0. (#3493)
- The prebuilt Mac package now also includes prebuilt druntime/Phobos for the iOS/x86_64 simulator, making cross-compilation work out of the box with
-mtriple=x86_64-apple-ios12.0
. (#3478)
Platform support
- Supports LLVM 6.0 - 10.0.
Bug fixes
- Fix naked DMD-style asm emission for non-Mac x86 Darwin targets (e.g., iOS simulators). (#3478)
-betterC
: Don't use unsupported EH for handling clean-ups. (#3479, #3482)- dcompute: Fix wrong address space loads and stores. Thx Rob! (#3428)
- Fix ICE wrt. missing IR declarations for some forward-declared functions. (#3496, #3503)
Internals
- Compiler performance wrt. string literals emission has been improved. Thx @looked-at-me! (#3490, #3492)
- Link libstdc++ statically for
libldc-jit.so
of prebuilt Linux packages, to increase portability. (#3473, #3474) - Set up Visual D when using the Visual Studio CMake generator, making LDC compiler development on Windows a smooth out-of-the-box experience. (#3494)
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.