在现有的iPhone项目上将编译器更改为llvm-clang

Cor*_*oyd 7 iphone xcode cocoa-touch

当我在现有项目中将编译器版本切换到Clang llvm 1.0时,在预编译*.pch文件时出现以下构建错误:

error: can't exec '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2' (No such file or directory)
Run Code Online (Sandbox Code Playgroud)

我需要更改另一个设置以使我的项目与新编译器一起使用吗?

(我确实试过清洁所有目标)


更新:

澄清:

由于新编译器确实可以处理新项目,因此问题不在于我的系统缺少任何东西.

另外,Xcode甚至不应该试图找到llvm-gcc-4.2,因为我要从编译器切换到新的编译器,Clang llvm 1.0.这让我相信还有另一个环境需要改变.


感谢fbereto的建议.实际的答案在于评论.

fbr*_*eto 5

如果查看错误指定的路径,则无法找到llvm-gcc-4.2iPhone设备的LLVM编译器():

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
Run Code Online (Sandbox Code Playgroud)

话虽这么说,一个为iPhone模拟器存在:

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
Run Code Online (Sandbox Code Playgroud)

所有这些都说明虽然可以在LLVM下为Simulator编译你的iPhone应用程序,但设备本身不存在等效工具.

(答案详见下面的评论.)