www. O S N E W S .com
News Features Interviews
BlogContact Editorials
.
Clang is now used to build Chrome for Windows
By Thom Holwerda on 2018-03-06 20:08:43

As of Chrome 64, Chrome for Windows is compiled with Clang. We now use Clang to build Chrome for all platforms it runs on: macOS, iOS, Linux, Chrome OS, Android, and Windows. Windows is the platform with the second most Chrome users after Android according to statcounter, which made this switch particularly exciting.

 Email a friend - Printer friendly - Related stories
.
Read Comments: 1-10 -- 11-18
.
RE[3]: slow decline of GCC ?
By ahferroin7 on 2018-03-08 12:17:22
Interesting. I've never built Chromium with Clang, but I have done webkit-gtk and Firefox with it before, and both of those built faster. I've not tried recently though, and performance of GCC may have significantly improved since I last tried.
Permalink - Score: 2
.
RE[5]: slow decline of GCC ?
By Kochise on 2018-03-08 13:48:48
Yup, try different gcc versions, forks, branches, vendor revisions, one might by chance fit your need for your project. But you might have to walk the same trial and error path to find the suitable gcc incarnation for another project.

Or just switch to a mature compiler that is not fuzzy and ticklish, no leaves gaping holes open for years, implement the standard correctly without implementing "extensions" that are not compatible with the competition.

Bref, a suitable 3rd millennium compliant compiler. Not a thing from the past.
Permalink - Score: -1
.
RE[5]: slow decline of GCC ?
By kwan_e on 2018-03-08 14:18:11
> When some parts of your code are optimised-out it means these parts are redundant or not used.

Or you're checking this for null.
Permalink - Score: 2
.
RE[2]: slow decline of GCC ?
By FlyingJester on 2018-03-08 19:20:13
In the case of several systems such as OpenBSD, it is indeed the license, although a barrier to adoption is LLVM and Clang supporting many fewer targets, and not always being self-hosting.

In my own experience, current versions of LLVM+Clang and GCC take a similar amount of time to download and build (although CMake makes me want to build clang a lot less). The code output is very comparable as well. Sometimes Clang is better, sometimes GCC is better ( https://t.co/k3d4mN7EqE )

Edited 2018-03-08 19:22 UTC
Permalink - Score: 4
.
RE[2]: slow decline of GCC ?
By tylerdurden on 2018-03-08 21:20:53
This is Chrome for Windows, it was built using MSVCC not gcc.


clang had a bit of an edge over gcc in compile speed a few years back. But I think they compile speed differential is not that significant anymore when it comes to recent llvm vs gcc toolchains.
Permalink - Score: 3
.
RE[6]: slow decline of GCC ?
By viton on 2018-03-09 07:11:49
> Yup, try different gcc versions, forks, branches, vendor revisions, one might by chance fit your need for your project.
That I proposed was a way to diagnose the problem. If you think the problem is compiler specific - try different version to make sure.

A lot of programs in devices around you are compiled with GCC and optimization enabled. If your software is unstable, GCC isn’t the right thing to blame.

Edited 2018-03-09 07:12 UTC
Permalink - Score: 3
.
RE[2]: slow decline of GCC ?
By Carewolf on 2018-03-11 09:05:06
> > I wonder if it's the technical merit of llvm in general, or gpl3 that's turning people away from gcc nowadays.

It's more like the technical demerit of gcc. GCC is a cumbersome code base, and the move to develop in C++ was probably too late.

LLVM Clang is easier to develop for.

True. I have contributed patches to both and LLVM is by far the easiest code to read.

Yet somehow GCC still produces faster code, and after being challenged by Clang they now also compile faster.. So they must be doing something right.
Permalink - Score: 2
.
RE[2]: slow decline of GCC ?
By Carewolf on 2018-03-11 09:07:25
No, they did this for the compiler monoculture. They didn't want to deal with different quirks in different compilers, so now they only support one single compiler, and thus ends up depending on their bugs (I am a Chromium embedded and have already had to fix several clang'isms in the Chromium 65 code just a few weeks after they went monoculture).
Permalink - Score: 2

Read Comments 1-10 -- 11-18

No new comments are allowed for stories older than 10 days.
This story is now archived.

.
News Features Interviews
BlogContact Editorials
.
WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?