Google Chrome replaces Microsoft’s C++ compiler with Clang
While Google is already using the Clang compiler for iOS, macOS, Linux and Android versions of Chrome, the search giant has now started developing Chrome for Windows using the Clang compiler. Previously, the Windows version of Chrome was built using the Microsoft Visual C ++ compiler.
Clang is a well-known open source compiler that is often used alongside GCC on Linux. It can be used to compile many C family programming languages, including C, C ++, Objective C, and Objective C ++. According to Google, the major advantage of Clang is that it is compatible with parts of Microsoft Visual C ++ (MSVC).
Microsoft’s Visual C++ compiler is the most widely used and best supported compiler for Windows and is most compatible with debugging and diagnostic tools for the operating system. However, back in 2013, Google decided to use Clang on all platforms to have the same compiler error working across platforms – while accessing Clang’s diagnostic tools like ASan and UBSan. But then, it did not have any real Windows support.
That’s when Google decided to rectify the problem on its own. The company assembled their own team of developers and assigned them the task of improving Clang and LLVM compatibility. Although an early prototype of Clang-compiled Chrome browser for Windows first surfaced in 2015, Google tested it first in its Canary development channel, then the Development and Beta channels. With Chrome version 64, the stable browser channel is making the switch to using Clang.
It is important to note that Clang is not a complete replacement for the entire Visual Studio toolset. Currently, Google still uses Microsoft linker (the segment of the toolchain that mixes the compiled source code accurate into a single executable or DLL) and Microsoft’s C++ platform Library. However, it has plans to move over to Clang’s LLVM linker as soon as it can.
You can read the full technical details on the LLVM blog.
Source: Ars Technica
The author Kavita Iyer
An individual, optimist, homemaker, foodie, a die hard cricket fan and most importantly one who believes in Being Human