github ldc-developers/ldc v1.8.0
LDC 1.8.0

latest releases: v1.38.0-beta1, dmd-rewrite-v2.108.0, dmd-rewrite-v2.108.0-rc.1...
6 years ago

(Changes from 1.8.0-beta1 release are marked with (new).)

Big news

  • Frontend, druntime and Phobos are at version 2.078.3, incl. new switches -dip1008 and -transition=<intpromote|16997> as well as pragma(crt_{con,de}structor). (#2486)
  • New switch -link-defaultlib-shared to link against shared druntime/Phobos. It defaults to true for shared libraries (-shared), so it's primarily useful for executables. (#2443)
  • Support for plugins via -plugin=... (see this example). The mechanism is identical to Clang's LLVM-IR pass plugins and thus supports those as well, e.g., the AFLfuzz LLVM-mode plugin, Easy::Jit. (#2554)
  • Support for LLVM IR-based Profile-Guided Optimization via -fprofile-{generate,use} (not working on Windows yet). (#2474)
  • Basic support for LLVM XRay instrumentation via -fxray-{instrument,instruction-threshold}. (#2465)
  • DMD-style function trace profiling via -profile (LDMD) / -fdmd-trace-functions (LDC). (#2477)
  • New UDA ldc.attributes.assumeUsed to prevent a symbol from being optimized away. (#2457)
  • The PGO helper library ldc-profile-rt was replaced by LLVM's vanilla profiling library. Our subset of LLVM compiler-rt libraries is now also shipped on Windows (excl. fuzzer). (#2527, #2544)
  • Cherry-picked upstream Musl C runtime support for Docker images based on Alpine and added a native Alpine/x64 compiler, which requires the llvm5, musl-dev, and gcc packages to run and link D apps and the tzdata and libcurl packages for certain stdlib modules. (new)

Platform support

  • Supports LLVM 3.7 - 5.0.
  • Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017.

Bug fixes

  • Strict left-to-right evaluation/load order of function arguments. (#2450, #2502)
  • Inline asm silently ignores opcodes db, ds, di, dl, df, dd, de. (#2548)
  • Missed optimization for scope allocated classes. (#2515, #2516)
  • Don't eliminate frame pointer by default at -O0. (#2480, #2483)
  • LLVM complaining about invalid IR pointer arithmetics. (#2537)
  • llvm_expect() doesn't work with CTFE. (#2458, #2506)
  • .{so,dylib} file command line arguments should be forwarded to linker. (#2445, #2485)
  • macOS: Set shared stdlib install_name to @rpath/<filename>. (#2442, #2581) (new)
  • array ~= element issue if rhs affects the lhs length. (#2588, #2589) (new)
  • EH segfaults when checking D class catch handlers against thrown C++ exception. (#2590) (new)

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.
  • ThinLTO may not work well with the ld.bfd linker, use ld.gold instead (-linker=gold).

Don't miss a new ldc release

NewReleases is sending notifications on new releases.