My coworker has been burdened with the task of building our product for Apple devices, which, it turns out, means that he has to use clang instead of gcc. On discovering this I did a couple of laps around the room shouting "EXTERMINATE" but when I settled down I wondered if there was a reason they used this. Is this just apple being hipsters or is there a reason to switch compilers?
Name:
Anonymous2014-01-16 21:00
Clang uses LLVM which is an exposed (i.e. to the user via files and a small executable dictionary (i.e. tools)) intermediate representation which then gets compiled to machine code. It can also be interperted.
Also the target architecture is not a build time thing in LLVM so you don't have to rebuild your compiler if you want to target ARM, AVR, PIC etc. from your x86 or (different executable formats for that matter e.g. ELF, whatever Windows uses). On the other hand, LLVM can't (yet) target even 5% of what GCC can.
It's also easy for languages all compiling to LLVM to communicate with eachother (one O.K sounding one is Julia).