Re: Switching from GCC to Clang, any downsides?
Re: Switching from GCC to Clang, any downsides?
- Subject: Re: Switching from GCC to Clang, any downsides?
- From: Chris Espinosa <email@hidden>
- Date: Tue, 8 Sep 2009 10:03:07 -0700
On Sep 7, 2009, at 10:47 AM, Markus Spoettl wrote: Reading the Snow Leopard review on Ars Technica, the author writes that Clang is now Apple's recommended compiler. So I thought I look it up in the documentation, but there's not terribly much on Clang at all. In fact there's not the slightest hint that this statement is true - judging from the docs and release notes alone.
Apple's default and recommended compiler for Snow Leopard is gcc-4.2. The llvm-gcc4.2 and clang-llvm compilers are available and fully qualified, but are not as mature as gcc 4.2 and lack certain features. (Clang, for example, does not compile C++ or Objective-C++ code.) Clang and llvm also do not generate code for the iPhone device at this time. I've since switched to Clang and everything appears to be perfectly fine. However, since there's so little in information on this topic there may be some caveats involved when switching from GCC. Are there?
We converted the entire Xcode source code base (2.5MLOC) first to llvm-gcc then to clang-llvm with very few problems. The Clang team went through three or four compiler builds until it built everything correctly, then there was one problem with Blocks (a brand-new language and runtime feature), but otherwise the switchover to Clang went incredibly smoothly for us. It is a very, very, very solid brand-new compiler. But it is not unreasonable to be a little squeamish about a brand-new compiler, so it is not the default in Snow Leopard or Xcode.
Chris |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden