Linked by Thom Holwerda on Tue 6th Mar 2018 20:08 UTC
Google

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.

Thread beginning with comment 654331
To read all comments associated with this story, please click here.
slow decline of GCC ?
by yoshi314@gmail.com on Wed 7th Mar 2018 07:52 UTC
yoshi314@gmail.com
Member since:
2009-12-14

I wonder if it's the technical merit of llvm in general, or gpl3 that's turning people away from gcc nowadays.

Granted, this is windows build we're talking about, but it seems that llvm is pushing forward on all fronts.

Edited 2018-03-07 07:53 UTC

Reply Score: 2

RE: slow decline of GCC ?
by agentj on Wed 7th Mar 2018 08:24 in reply to "slow decline of GCC ?"
agentj Member since:
2005-08-19

GPL3. No large company is going to touch such software with a stick most of the time when it comes to development.

Reply Parent Score: 0

Bill Shooter of Bul Member since:
2006-07-14

No, companies that are simply using GPL V3 have nothing to worry about. Its companies that distribute it, that are concerned with GPL V3.

However, you are right that those companies that want to contribute to compilers, don't want o touch GPL V3. Hence they are pouring their efforts into LLVM efforts.

Now, because all the development is going into LLVM, its becoming better than GCC. The technical reasons follow shortly after the political.

Reply Parent Score: 3

RE: slow decline of GCC ?
by kwan_e on Wed 7th Mar 2018 08:27 in reply to "slow decline of GCC ?"
kwan_e Member since:
2007-02-18

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.

Reply Parent Score: 2

RE[2]: slow decline of GCC ?
by FlyingJester on Thu 8th Mar 2018 19:20 in reply to "RE: slow decline of GCC ?"
FlyingJester Member since:
2016-05-11

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

Reply Parent Score: 4

RE[2]: slow decline of GCC ?
by Carewolf on Sun 11th Mar 2018 09:05 in reply to "RE: slow decline of GCC ?"
Carewolf Member since:
2005-09-08

"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.

Reply Parent Score: 2

RE: slow decline of GCC ?
by malxau on Wed 7th Mar 2018 09:10 in reply to "slow decline of GCC ?"
malxau Member since:
2005-12-04

I wonder if it's the technical merit of llvm in general, or gpl3 that's turning people away from gcc nowadays.


For me, it was pure code generation. For my relatively simple projects, clang would produce code that's about 10%-15% smaller than gcc. clang was still not quite as good as Visual C++, but gcc was an outlier. Turning your point around, what would be the reason to use gcc over clang?

Reply Parent Score: 3

RE[2]: slow decline of GCC ?
by kwan_e on Wed 7th Mar 2018 09:49 in reply to "RE: slow decline of GCC ?"
kwan_e Member since:
2007-02-18

For my relatively simple projects, clang would produce code that's about 10%-15% smaller than gcc.


After -O2 or -Os, I find they're both about the same. Clang is a much faster compiler, hands down. My understanding is that GCC can be overly aggressive in optimization so may end up generating code that isn't the best for relatively simple projects.

Reply Parent Score: 4

RE: slow decline of GCC ?
by ahferroin7 on Wed 7th Mar 2018 13:26 in reply to "slow decline of GCC ?"
ahferroin7 Member since:
2015-10-30

For a large project like Chrome, I'd be more than willing to bet that a large part of the appeal is the compilation performance of Clang compared to GCC. In my own experience, builds that use Clang tend to take between 10 and 15% less time than building the same code with GCC. While that may not sound like much, it becomes very significant when you're dealing with stuff that takes hours to build even on high-end systems (see for example LibreOffice, Firefox, Thunderbird, and the various WebKit libraries).

Reply Parent Score: 3

dylansmrjones Member since:
2005-10-02

Reverse is true for me. I get shorter compilation times with gcc for chromium than with clang (still takes some hours). Otoh, anything obj-c is done with clang. There's no compelling technical reasons to choose one over the other in general. As is evident from assorted tests and comparisons. I rely on both.

Reply Parent Score: 3

RE[2]: slow decline of GCC ?
by tylerdurden on Thu 8th Mar 2018 21:20 in reply to "RE: slow decline of GCC ?"
tylerdurden Member since:
2009-03-17

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.

Reply Parent Score: 3

RE[2]: slow decline of GCC ?
by Carewolf on Sun 11th Mar 2018 09:07 in reply to "RE: slow decline of GCC ?"
Carewolf Member since:
2005-09-08

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).

Reply Parent Score: 2