Skip to content

Releases: ldc-developers/ldc

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)

LDC 1.31.0

11 Feb 11:34
91f28da
Compare
Choose a tag to compare

Big news

  • Frontend, druntime and Phobos are at version 2.101.2. (#4141, #4279)
  • Bit fields support. (#4015)
  • macOS on Apple M1: linking with -g is working again without unaligned pointer warnings/errors. This fixes file:line debug information in exception backtraces (requiring atos, a macOS development tool installed with Xcode), without the need to set MACOSX_DEPLOYMENT_TARGET=11 and using a modified LLVM. (#4291)
  • Preliminary support for LLVM 15, incl. adding support for the 'new' pass manager (-passmanager) and opaque IR pointers (-opaque-pointers). (way too many PRs to list!)
  • New command-line option -fno-delete-null-pointer-checks, mimicking the same option of GCC and Clang. (#4297)
  • New UDA ldc.attributes.callingConvention("..."), which overrides the default calling convention. For expert use only! (#4299)
  • New command-line option -fno-discard-value-names to keep value names in LLVM IR. (#4012)
  • dcompute: Support for OpenCL image I/O. (#3835)

Platform support

  • Initial ABI support for 64-bit RISC-V. (#4007)

Bug fixes

  • dcompute: Fix v1.29 regression when trying to use intrinsics. (#4266, #4267)
  • Fix 64-bit symbol offsets. (#4264, #4283)
  • Add missing 32-bit LTO versions of druntime & Phobos to Linux multilib package. (#4234, #4235)
  • Fix compiler crash. (#4130, #4135)

Internals

  • The former druntime and dmd-testsuite git submodules are now part of the LDC repo directly, leaving Phobos as single remaining submodule. We are now using a subset of the DMD repo (which includes druntime since v2.101), rewritten via git filter-repo and exposed as dmd-rewrite-* branches/tags in the LDC repo, to merge newer frontend+druntime+tests from upstream DMD. The tests/d2/dmd-testsuite dir was moved to tests/dmd. (#4274, #4276)

LDC 1.31.0-beta1

27 Jan 18:35
10c680d
Compare
Choose a tag to compare
LDC 1.31.0-beta1 Pre-release
Pre-release

Big news

  • Frontend, druntime and Phobos are at version 2.101.2. (#4141, #4279)
  • Bit fields support. (#4015)
  • macOS on Apple M1: linking with -g is working again without unaligned pointer warnings/errors. This fixes file:line debug information in exception backtraces (requiring atos, a macOS development tool installed with Xcode), without the need to set MACOSX_DEPLOYMENT_TARGET=11 and using a modified LLVM. (#4291)
  • Preliminary support for LLVM 15, incl. adding support for the 'new' pass manager (-passmanager) and opaque IR pointers (-opaque-pointers). (way too many PRs to list!)
  • New command-line option -fno-delete-null-pointer-checks, mimicking the same option of GCC and Clang. (#4297)
  • New UDA ldc.attributes.callingConvention("..."), which overrides the default calling convention. For expert use only! (#4299)
  • New command-line option -fno-discard-value-names to keep value names in LLVM IR. (#4012)
  • dcompute: Support for OpenCL image I/O. (#3835)

Platform support

  • Initial ABI support for 64-bit RISC-V. (#4007)

Bug fixes

  • dcompute: Fix v1.29 regression when trying to use intrinsics. (#4266, #4267)
  • Fix 64-bit symbol offsets. (#4264, #4283)
  • Add missing 32-bit LTO versions of druntime & Phobos to Linux multilib package. (#4234, #4235)
  • Fix compiler crash. (#4130, #4135)

Internals

  • The former druntime and dmd-testsuite git submodules are now part of the LDC repo directly, leaving Phobos as single remaining submodule. We are now using a subset of the DMD repo (which includes druntime since v2.101), rewritten via git filter-repo and exposed as dmd-rewrite-* branches/tags in the LDC repo, to merge newer frontend+druntime+tests from upstream DMD. The tests/d2/dmd-testsuite dir was moved to tests/dmd. (#4274, #4276)

LDC 1.30.0

20 Jul 17:05
32f5a35
Compare
Choose a tag to compare

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

Big news

  • Frontend, druntime and Phobos are at version 2.100.1. (#3970, #4008, #4009) (new)
  • 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 LeakSanitizer support via -fsanitize=leak (not (yet?) supported on Windows). (#4005) (new)
  • 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)
    • Avoid an external x86_64-only dub, use the bundled universal dub executable instead.

Platform support

  • Supports LLVM 9.0 - 14.0.

Bug fixes

  • Enable output of variable names in ASan and MSan error reporting. (#4004) (new)
  • Report unexpected type repaints as fatal ICEs instead of crashing. (#3990, #3991) (new)

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)

Known issues

  • On macOS 12+, linking arm64 code compiled with -g likely results in unaligned pointer linker errors. Setting environment variable MACOSX_DEPLOYMENT_TARGET=11 weakens those to warnings; compiling with -preserve-dwarf-line-section=false is another option. (#3864)