Skip to content

Releases: ldc-developers/ldc

LDC 1.34.0

26 Aug 11:28
Compare
Choose a tag to compare

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

Big news

  • Frontend, druntime and Phobos are at version 2.104.2. (#4440)
  • Support for LLVM 16. The prebuilt packages use v16.0.6. (#4411, #4423)
    • We have come across miscompiles with LLVM 16's newly-enabled-by-default function specializations (on Win64 and macOS). To be on the safe side, LDC disables them by default for all targets via -func-specialization-size-threshold=1000000000 in etc/ldc2.conf (and separately for LTO on Posix platforms). To enable the function specializations, explicitly override it with e.g. -func-specialization-size-threshold=100 (the LLVM 16 default) and, for LTO on Posix, a similar LTO plugin option in the linker cmdline (see linker cmdline with -v).

Platform support

  • Supports LLVM 11.0 - 16.0. Support for LLVM 9 and 10 was dropped.
  • 64-bit RISC-V: Now defaults to -mattr=+m,+a,+f,+d,+c ('rv64gc' ABI) for non-bare-metal targets, i.e., if the target triple includes a valid operating system. (#4390) (new)

Bug fixes

  • Fix function pointers/delegates on Harvard architectures (e.g., AVR). (#4432, #4465)

LDC 1.34.0-beta2

17 Aug 16:32
aea290d
Compare
Choose a tag to compare
LDC 1.34.0-beta2 Pre-release
Pre-release

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

Big news

  • Frontend, druntime and Phobos are at version 2.104.2. (#4440)
  • Support for LLVM 16. The prebuilt packages use v16.0.6. (#4411, #4423) (new)
    • We have come across miscompiles with LLVM 16's newly-enabled-by-default function specializations (on Win64 and macOS). To be on the safe side, LDC disables them by default for all targets via -func-specialization-size-threshold=1000000000 in etc/ldc2.conf (and separately for LTO on Posix platforms). To enable the function specializations, explicitly override it with e.g. -func-specialization-size-threshold=100 (the LLVM 16 default) and, for LTO on Posix, a similar LTO plugin option in the linker cmdline (see linker cmdline with -v).

Platform support

  • Supports LLVM 11.0 - 16.0. Support for LLVM 9 and 10 was dropped. (new)

Bug fixes

  • Fix function pointers/delegates on Harvard architectures (e.g., AVR). (#4432, #4465) (new)

LDC 1.34.0-beta1

28 Jul 22:22
1a93fc7
Compare
Choose a tag to compare
LDC 1.34.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.104.2. (#4440)

LDC 1.33.0

23 Jul 18:58
Compare
Choose a tag to compare

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

Big news

  • Frontend, druntime and Phobos are at version 2.103.1, incl. new command-line option -verror-supplements. (#4345)
  • The --plugin commandline option now also accepts semantic analysis plugins. Semantic analysis plugins are recognized by exporting the symbol: extern(C) void runSemanticAnalysis(Module m). The plugin's runSemanticAnalysis function is called for each module, after all other semantic analysis steps (also after DCompute SemA), just before object codegen. (#4430) (new)
  • New tool ldc-build-plugin that helps compiling user plugins. It downloads the correct LDC source version (if it's not already available), and calls LDC with the correct commandline flags to build a plugin. (#4430) (new)
  • New commandline option -femit-local-var-lifetime that enables variable lifetime (scope) annotation to LLVM IR codegen. Lifetime annotation enables stack memory reuse for local variables with non-overlapping scope. (#4395)
  • C files are now automatically preprocessed using the external C compiler (configurable via -gcc or the CC environment variable, and -Xcc for extra flags). Extra preprocessor flags (e.g., include dirs and manual defines) can be added via new command-line option -P. (#4417)
    • Windows: If clang-cl.exe is on PATH, it is preferred over Microsoft's cl.exe by default (e.g., to avoid printing the C source file name to stderr during preprocessing).
  • Less pedantic checks for conflicting C(++) function declarations when compiling multiple modules to a single object file ('Error: Function type does not match previously declared function with the same mangled name'). The error now only appears if an object file actually references multiple conflicting functions. (#4420)
  • New command-line option --fcf-protection, which enables Intel's Control-Flow Enforcement Technology (CET). (#4437) (new)

Platform support

  • Supports LLVM 9.0 - 15.0.

Bug fixes

  • Handle potential lambda mangle collisions across separately compiled object files (and the linker then silently picking an arbitrary implementation). Lambdas (and their nested global variables) are now internal to each referencing object file (static linkage in C). (#4415)

LDC 1.33.0-beta2

11 Jun 00:52
29bf2d3
Compare
Choose a tag to compare
LDC 1.33.0-beta2 Pre-release
Pre-release

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

Big news

  • Frontend, druntime and Phobos are at version 2.103.1, incl. new command-line option -verror-supplements. (#4345)
  • New commandline option -femit-local-var-lifetime that enables variable lifetime (scope) annotation to LLVM IR codegen. Lifetime annotation enables stack memory reuse for local variables with non-overlapping scope. (#4395) (new)
  • C files are now automatically preprocessed using the external C compiler (configurable via -gcc or the CC environment variable, and -Xcc for extra flags). Extra preprocessor flags (e.g., include dirs and manual defines) can be added via new command-line option -P. (#4417) (new)
    • Windows: If clang-cl.exe is on PATH, it is preferred over Microsoft's cl.exe by default (e.g., to avoid printing the C source file name to stderr during preprocessing).
  • Less pedantic checks for conflicting C(++) function declarations when compiling multiple modules to a single object file ('Error: Function type does not match previously declared function with the same mangled name'). The error now only appears if an object file actually references multiple conflicting functions. (#4420) (new)

Bug fixes

  • Handle potential lambda mangle collisions across separately compiled object files (and the linker then silently picking an arbitrary implementation). Lambdas (and their nested global variables) are now internal to each referencing object file (static linkage in C). (#4415) (new)

LDC 1.33.0-beta1

13 May 22:33
d2b1497
Compare
Choose a tag to compare
LDC 1.33.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.103.1, incl. new command-line option -verror-supplements. (#4345)

LDC 1.32.2

12 May 18:59
Compare
Choose a tag to compare

Big news

  • New command-line option --fwarn-stack-size=<threshold> with LLVM 13+. (#4378)
  • New command-line option --fsplit-stack for incremental stack allocations, see https://llvm.org/docs/SegmentedStacks.html. (#4379)
    • New UDA ldc.attributes.noSplitStack disables it on a per-function basis. (#4382)
  • New command-line option --indent for the timetrace2txt tool. (#4391)

Bug fixes

  • Fix potentially huge compile slowdowns with -g and LLVM 15+. (#4354, #4393)
  • Treat all LLVM warnings as regular warnings (e.g., errors with -w). Requires LLVM 13+. (#4384)

LDC 1.32.1

17 Apr 13:08
Compare
Choose a tag to compare

Big news

  • The prebuilt Linux packages are now generated on a Ubuntu 20.04 box, so the min required glibc version has been raised from 2.26 to 2.31. (#4367)

Bug fixes

  • Fix empty ldc.gccbuiltins_* modules with LLVM 15+. (#4347, #4350)
  • Fix v1.31 regression wrt. potentially wrong constant pointer offsets. (#4362, #4365)
  • Windows: Fix v1.32 regression wrt. leaking Throwable.info backtraces. (#4369)
  • Fix C assert calls for newlib targets. (#4351)

LDC 1.32.0

12 Mar 14:37
c5cf086
Compare
Choose a tag to compare

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

Big news

  • Frontend, druntime and Phobos are at version 2.102.2. (#4323, #4341) (new)
  • LLVM for prebuilt packages bumped to v15.0.7. (#4311)
  • Linker-level dead code elimination is enabled by default for Apple, wasm and all ELF targets too now. (#4320)
  • Vector comparisons (==, !=, <, <=, >, >=) now yield a vector mask. Identity comparisons (is, !is) still yield a scalar bool. (3a59ee8)
  • New timetrace2txt tool for easier inspection of --ftime-trace output. (#4335) (new)
  • --ftime-trace now also traces CTFE execution: the start expression of CTFE and function calls during CTFE. (#4339) (new)

Platform support

  • Supports LLVM 9.0 - 15.0.
  • Now supports -mabi for RISC-V targets. (#4322)

Bug fixes

  • GC closures including variables with alignment > 16 bytes are now properly aligned. (ef8ba48)
  • Fix regression with LLVM 13+: some errors in inline assembly don't stop compilation. (#4293, #4331)

LDC 1.32.0-beta1

27 Feb 21:34
981c58e
Compare
Choose a tag to compare
LDC 1.32.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.102.1+. (#4323)
  • LLVM for prebuilt packages bumped to v15.0.7. (#4311)
  • Linker-level dead code elimination is enabled by default for Apple, wasm and all ELF targets too now. (#4320)
  • Vector comparisons (==, !=, <, <=, >, >=) now yield a vector mask. Identity comparisons (is, !is) still yield a scalar bool. (3a59ee8)

Platform support

  • Supports LLVM 9.0 - 15.0.
  • Now supports -mabi for RISC-V targets. (#4322)

Bug fixes

  • GC closures including variables with alignment > 16 bytes are now properly aligned. (ef8ba48)
  • Fix regression with LLVM 13+: some errors in inline assembly don't stop compilation. (#4293, #4331)