Is GCC being replaced by LLVM? [closed]
Asked Answered
M

1

6

I wonder whether LLVM by virtue of its newer design is to replace GCC in the open-source world?

LLVM should feature several techniques of inspecting code, so that IDE's are easier to program etc. However, GCC should still be good in terms of performance.

Miler answered 7/12, 2016 at 16:31 Comment(1)
I'm voting to close this question as off-topic because it is not about a specific solvable programming problem.Colter
A
6

Short answer: No. They're both widely used depending on the context.

Long answer:

Depends, it's a matter of adoption as well as other factors.

For example, Apple uses LLVM (and Clang) for pretty much everything including building the kernel (previously built using GCC), bootloader and the userspace. As well as that, LLVM is used in the graphics drivers for compiling shaders to SGX USSE bytestreams, though here it's largely a case of eating your own dogfood.

As well as that, LLVM is also used in open source projects, for example in Mesa and in the Dolphin Emulator for JIT compilation.

Aside from that, GCC still has predominant usage, for example, Linux is built using GCC and while there have been attempts to build Linux using Clang+LLVM, they were more of an experiement than anything. As well as that, in the embedded world, a lot of embedded applications (for example, UBoot and Little Kernel) rely on features provided by GCC extensions and outright won't build with Clang+LLVM failing either at compilation to objects or linking stages.

For userspace applications however, it's largely a matter of personal (or your company's preference) since both of them offer roughly the same feature set including stuff like SIMD support and full support for C++14 and C11 (though GCC has some annoying unresolved bugs when it comes to C++ support, for example, Bug 61636).

The code inspection techniques are largely provided by Clang and in my personal experience provided a substantial amount of overhead (for example in Qt Creator and less so in XCode).

Antionetteantioxidant answered 7/12, 2016 at 16:52 Comment(3)
Have I understood it correctly that GCC is "ancient" in design, while LLVM attempts to fix some of its shortcommings? Also, LLVM makes it easier to write an compiler?Miler
Any update :-) ?Miler
This is 2022: Clang is now the dominate over GNUC.Teakwood

© 2022 - 2024 — McMap. All rights reserved.