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: Markus Spoettl <email@hidden>
- Date: Wed, 9 Sep 2009 15:27:29 +0200
Hello,
On Sep 8, 2009, at 7:03 PM, Chris Espinosa wrote:
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.
Thanks all for the input.
I ran into an issue today where the app crashes when started through
the Instruments/Leaks tool (according to the stack trace the crash
happens in WebKit). Recompiled in GCC 4.2 and everything works as
expected.
I guess that means that we're not going to use Clang just yet. Too
many maybes and some real issues (missing warnings for real code
errors) and we're too close to our own release, so squeamishness is in
order.
I'm looking forward to switching, though.
Regards
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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