(Last Updated On: March 7, 2018 8:07 pm)
Getting rid of Microsoft’s current Programming Compiler
At this moment, Google’s Chrome browser is utilizing the so-called Clang compiler for Windows, instead of Microsoft C++. Therefore, Google is currently in use of the same programming compiler for the following: macOS, Windows, Android and Linux. Consequently, Chrome will, therefore, be the first big project to use Clang software on Windows.
How did we get here
Let’s take a look at 2013, time when Google made the decision to use Clang all the way-way that included Windows. It had certain advantages because using the same compiler for everything simplified the way errors and bugs on the platform were dealt with. A big plus brought to Clang is the fact that tools for diagnostic (UBSan and ASan) were long wanted by Google.
Chrome on Windows, on the other hand, chose Microsoft’sVisual C++ compiler, based on the review of it being the most well supported and customer choice for Windows. It had great support regarding debugging and in reach of tools for diagnosing. Vital elements of the Windows developer experience consist of Visual Studio debugger, mentioned earlier, and WinDbg, of which C++ brotherhood is extremely fond of.
LLVM toolchain together with Clang didn’t benefit much from Windows support. This affected them in both surface and deeper ways. If we look at it, what Windows uses for tooling is all sketched around the program database (known as PDB) file format containing valuable debug features and content. All the perks that Windows has in reach, debuggers and third-party instruments, draw conclusions about Window’s programs availability as PDB documents. There is a catch: LLVM can’t make program databases.
It’s no surprise that, as the case is for most large software projects, Windows APIs ask for add-ons that are not standard, determining Clang to alter itself in order to be able to support what was coming its way.
The purpose was getting Chrome to use Clang for Windows. The first step to it was to upgrade LLVM and Clang so they would offer top quality assistance for Windows. Back in 2015, giving shape to the browser was a success and had Google to multi-test it in: Canary development channel, followed by Development and Beta channels.
Microsoft brings its contribution by making an important amount of source used for fabricating PDBs public, making sure that both their headers and the C++ libraries function properly with Clang.
Changes are still to be made
At the current time, Google hasn’t completely moved to LLVM toolchain but is planning to do so once Microsoft C++ library won’t do anymore. For future plans, Google is thinking of switching to LLVM linker and put Clang C++ library in use as well.