github ldc-developers/ldc v1.4.0-beta1
LDC 1.4.0-beta1

latest releases: v1.40.0, v1.40.0-beta6, v1.40.0-beta5...
pre-release7 years ago

Big news

  • Frontend, druntime and Phobos are at version 2.074.1. (#2076)
  • ldc-build-runtime: Small D tool making it easy to (cross-)compile the LDC runtime libraries yourself, e.g., to enable LTO-ability/sanitizers, prepare for (cross-)linking executables and shared libraries, or aid in adding support for a new target platform. (Wiki page)
  • @joakim-noah's Android fixes have finally been fully incorporated, enabling every host to (cross-)compile to Android. (ldc-developers/llvm@8655f32) You can also try out the native Android/arm package below, ie a D compiler that you can run on your Android smartphone or tablet, by following these installation instructions and usage examples from the wiki (to use the native compiler beta below, download it in Termux and install with dpkg -i ldc-beta_1.4.0-1_android-arm.deb).
  • Improved support for AddressSanitizer. LDC will automatically link with the AddressSanitizer runtime library when -fsanitize=address is passed (when LDC can find the AddressSanitizer library).
  • libFuzzer sanitizer support using -fsanitize=fuzzer (same as Clang). This flag implies -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp and automatically links-in the runtime libFuzzer library if LDC can locate the runtime library. (With LLVM 4.0, there is a dependency on sanitizer runtime, so manually link the ASan library or use -fsanitize=fuzzer,address.)
  • New -fsanitize-blacklist=<file> command-line option to exclude functions from sanitizer instrumentation (identical to Clang). The file must adhere to the textual Sanitizer Special Case List format.
  • New -fsanitize-coverage=... command-line option with the same functionality as Clang.

Breaking changes

  • The -sanitize command-line option has been renamed to -fsanitize*, for clang conformance.
  • The semantics of an empty -conf= command-line option have been changed from 'use default config file' to 'use no config file'.
  • The binary representations of the init values for float/double/real have been unified to a special quiet NaN, with both most significant mantissa bits set, on all hosts and for all targets. (#2207)

Platform support

  • Supports LLVM 3.7 - 5.0. Support for 3.5 and 3.6 has been dropped.
  • Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. The latest Visual Studio 2017 Update (15.3) appears to break TLS and is not supported (-link-internally may be able to work around it).

Changes to the prebuilt packages

  • Consistent usage of a minimally tailored LLVM 4.0.1.
  • Linux x86_64:
    • Shipping with the LLVM LTO plugin for the gold linker. On Ubuntu 16.04, -flto=full|thin works out of the box; 14.04 may need an additional -Xcc -fuse-ld=gold in the LDC command line.
    • Build environment upgraded from Ubuntu 12.04 and gcc 4.9 to Ubuntu 14.04 and gcc 6.3.
  • Windows/MSVC: Build environment upgraded from Visual Studio 2015 Update 3 to Visual Studio 2017 15.0 (WinSDK 10.0.14393).

Bug fixes

  • LLVM error Global variable initializer type does not match global variable type! for T.init with explicit initializers for dominated members in nested unions. (#2108)
  • Inconsistent handling of lvalue slicees wrt. visible side-effects of slice lower/upper bound expressions. (#1433)
  • Misc. dcompute issues. (#2195, #2215)
  • Potential LDC crashes due to dangling pointers after replacing IR globals (required in some cases if the type contains unions) almost fully mitigated. (#1829)
  • Multiple arrayop function emissions. (#2216)
  • Potentially incorrect memory layout for unnaturally aligned aggregates. (#2235)
  • Wrong -m32/64 in command-line for external ARM assembler used via -no-integrated-as.

Internals

  • Misc. CI improvements:
    • Addition of high-performant SemaphoreCI (incl. enabled LLVM/LDC assertions).
    • CircleCI upgraded to 2.0, testing with latest gcc and LLVM nightly.
  • Compile all D files for (non-unittest) druntime/Phobos at once. May be disabled via CMake option COMPILE_ALL_D_FILES_AT_ONCE=OFF. (#2231)

Known issues

  • 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.
  • Phobos does not compile on MinGW platform.

Don't miss a new ldc release

NewReleases is sending notifications on new releases.