4 ms·
What are your reasons for preferring clang over gcc?
by donkeybeer 3y ago
What are your reasons for preferring clang over gcc?
- sidkshatriya 3y agoClang/LLVM allows a lot of tinkering and compiler software development that is more difficult with gcc. Clang/LLVM is just an easier platform for code instrumentation, cross compilation, code sanitizers, building your own compiler tool/language, understanding the codebase, good documentation to build your own LLVM based tools... It's a bonus that any tools/languages etc. you build using the LLVM infrastructure does not virally become GPL also. Aparently Clang is ~5% faster than GCC (at least on intel's latest chip) -- See https://www.phoronix.com/review/intel-meteorlake-gcc-clang https://www.phoronix.com/review/intel-meteorlake-gcc-clang . Though this is not a big deal for me -- it is just nice to know.
- donkeybeer 3y agoGPL is a positive for me. I am not sure if there is an llvm equivalent in gcc that would pose a "risk" anyways if you embark on such a project. I'll look into the instrumentation and llvm stuff, thanks.