LDC 是一个高性能的 D 语言编译器,后端基于 LLVM 架构生成跨平台的二进制文件,生成的二进制执行程序性能强劲。
最近 LDC 社区的开发效率比较高,可以迅速的跟进 DMD 编译器的新特性和 BUG 修复,本身也有很好的跨平台支持特性,包含 WebAssembly / Android / FreeBSD on PowerPC 等平台。
版本重要特性:
- D 语言版本支持升级到最新稳定版 2.088.1
- 支持最新的 LLVM 9.0 架构
- Preliminary Android CI, incl. experimental prebuilt armv7a package generation (API level 21, i.e., Android 5+). (#3164)
- 升级内置的 dub 版本到 1.17.0+ (因为此版本改进了 dub 对 LDC 编译器的支持) (dlang/dub#1755, Wiki)
- Init symbols of zero-initialized structs are no longer emitted. (#3131)
- druntime: DMD-compatible
{load,store}Unaligned
andprefetch
added tocore.simd
. (ldc-developers/druntime#163) - JIT improvements, incl. multi-threaded compilation. (#2758, #3154, #3174)
支持的 LLVM 架构版本:
- Supports LLVM 3.9 - 9.0.
Bug 修复:
- Don't error out when initializing a
void
vector. (#3130, #3139) - druntime: Fix exception chaining for latest MSVC runtime v14.23, shipping with Visual Studio 2019 v16.3. (ldc-developers/druntime#164)
- Keep lvalue-ness when casting associative array to another AA. (#3162, #3179) (new)
- druntime: Fix regression for POSIX systems without
backtrace[_symbols]
, introduced in beta1. (#3165, dlang/druntime#2796) - Fix compilability regression with
make
, introduced in beta2. (#3188, #3191) (new)
其他问题处理:
- 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.