开发者

Can I use LLVM (in Xcode) to compile an application targeted at OS X 10.5 and up?

开发者 https://www.devze.com 2023-01-30 16:35 出处:网络
The readme for Xcode 3.2.5 (PDF) says: Using the LLVM compiler requires the 10.6 SDK Does this mean that the LLVM compiler (not LLVM GCC) can only be used to compile applications targeted at 10.6

The readme for Xcode 3.2.5 (PDF) says:

Using the LLVM compiler requires the 10.6 SDK

Does this mean that the LLVM compiler (not LLVM GCC) can only be used to compile applications targeted at 10.6 and up, or just that the 10.6 SDK has to 开发者_运维技巧be present for the LLVM compiler to work?


You can target 10.5 using the LLVM compiler in either Xcode 3.2 or 4. I have been doing this for our control software for more than half a year, and it runs just fine on the Leopard machines we've deployed on.

As with all cases where you build with one SDK and target another, you'll need to verify that you don't use any features specific to the newer OS without appropriate runtime checks and / or weak linking of certain frameworks.


Based on a quick test, I was able to build a 10.5 app with LLVM using the latest Xcode, 3.2.5, which includes the 10.6 SDK. Having checked the product, the Info.plist records the minimum OS version as 10.5 and as far as I'm aware, the original choice of compiler has no effect on the way the OS runs the end product (as you'd expect). Unfortunately I don't have a 10.5 machine to test it on.

I'd therefore imagine that Apple just mean that LLVM ships with the 10.6 SDK.

0

精彩评论

暂无评论...
验证码 换一张
取 消