With Apple’s rapid move toward LLVM Clang, and Xcode 4.2 Apple LLVM 3.0 iOS 5 fast approaching this fall, what’s the status of Unity generated content being deployed to iOS through LLVM/Clang? I’ve been doing it for the last month through a combination of Unity 3.3, Xcode 4.0.x/4.2 and Apple Clang 2.0 3.0 and haven’t experienced any problems, but I’m wondering if there are any hidden caveats I may have missed.
Is GCC still the recommended compiler to use for iOS deployment of Unity generated content? Will UT at some point move to recommend Clang? Is Clang generated code counter-advised by UT for whatever reason (e.g. poor performance, crasher bugs, etc…)?
This isn’t a rapid move. They have been moving towards it and offering it for a year and a half now. Soon they will drop GCC forever.
Atm its a tiny, tiny bit slower. We’re talking in real world situations, no speed difference, and you would only notice if unity compiled it in that too. It doesn’t matter what unity is compiled in, because unless you’re coding in objective C, or C++ in xcode, you won’t see any gain or loss.
In short you really shouldn’t be worrying about this. If you use GCC or Clang, it will only affect the setup stuff. And soon you won’t have that choice.
Unity won’t compile any faster or slower with or without clang. its not a problem or issue for us. It’s a problem for people natively developing in xcode.
I know about the evolution of LLVM/Clang and Apple’s use of it, been following it rather closely for about a year and a half already. But in doing so, I’ve been a bit confused about Clang’s support for the arm architecture, because on the one side I’ve seen many messages on the Clang mailing list about its ongoing development (including messages from Arm people themselves talking about improving support coverage testing) and, on the other, I’ve seen the contrast to that from Apple’s position on moving to it so strongly (even if only after a few years of using LLVM technologies in various ways already) that even for iOS, reportedly, they’ve switched all internal compilation to Clang. Wouldn’t be surprised their internal LLVM repos differ more than slightly from the public ones (e.g. the ARC feature, which got merged to the public repo only once it was completed internally) and maybe therein (i.e. in the differences between the repos) lies a difference in ARM support.
So, all in all, I’m only wondering about the hidden caveats in using Clang for our iOS deployment, because my testing so far with stock Apple LLVM Compiler 2.0 3.0 have shown no problems of any kind. If there are none, then great, lets move on with progress! I can hardly remember what the default compiler setting for Unity generated Xcode projects is because I always customize mine, but I guess the best one would be “System default”, to let Apple do the switching for use under the hood.
Yeah although if you do xcode work, its better to be clang now rather than later just to be sure its little quirks are worked around. But we don’t work with xcode much, unity takes care of it. This is a mild potential issue for plugin developers though.