Windyland serving my blog

LLVM 6.0.0 Release

LLVM 6.0.0 is finally released. Although I keep updating its and Clang’s docsets for Dash, I didn’t have the time to follow the updates due to my busy work. After all, it has been a long time since last time I contributed to LLVM while it was still on 3.5 Release. I tried to pick it up and explain the new features and changes of recent years in this blog.


Let’s celebrate LLVM’s 6.0.0 Release. From the announcement email, it contains many new features, and changes:

  • Significantly improved quality of CodeView debug info for Windows
  • [X86] Retpoline Spectre variant 2 mitigation,
  • [X86] Improved scheduling on several x86 micro-architectures
  • [AArch64] GlobalISel by default for AArch64 at -O0

Clang has many changes as well:

  • Clang supports the -mretpoline flag to enable retpolines.
  • Clang defaults to -std=gnu++14 instead of -std=gnu++98
  • Clang supports for some upcoming C++2a features
  • Improved optimizations, new compiler warnings, many bug fixes, and more

Windows Support

The another millstone that the email doesn’t mention is that Clang is now used to build Chrome for Windows.

It is a great time for Clang that it is used for all major Operating Systems in production. Looking back to 2015, we still struggled in supporting MSVC ABI and language extensions which GCC never finishes. I remember Microsoft helped provide a license-compatible header and documents about PDB file format which Clang is able to use to produce/read PDB files. Although clang/c2 development is haled, now, clang-cl is able to produce binaries which is accepted by most of Microsoft toolchain.

In this blog, it explains very well about the detailed information that user wants to know about the windows support.


The most interesting parts of this update is Retpoline support for Clang, a compiler technique to allow indirect branches to be isolated from speculative execution immune to Spectre Variant 2.

Back to year 2017, there are three CPU bugs found in Intel’s and other X86 CPUs, notably Meltdown and Spectre Variant 1 and Spectre Variant 2. Meltdown make it is exposed the whole executative pages to unauthorized program, for current faulty processors. For a fix solution, Meltdown can be fixed with CPU microcode update and Operating System patch while Spectre issues are much larger and hard to deal. According to the [FAQ][spectre-fix], patching software with compiler support works for Spectre.

Before Clang 6.0 comes out, the only compiler in production supports Retpoline is GCC 7.3.0.