使用LLVM Clang 2.6和Xcode 3.2 [英] Using LLVM Clang 2.6 with Xcode 3.2

查看:208
本文介绍了使用LLVM Clang 2.6和Xcode 3.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我刚刚下载了LLVM Clang(2.6)二进制文件。
Mac OS X 10.6附带Clang 1.0。

您是否知道如何将较新版本的Clang与Xcode 3.2.x IDE集成?

So, I've just downloaded the LLVM Clang (2.6) binaries.
Mac OS X 10.6 comes with Clang 1.0.

Do you know how to integrate a later version of Clang with the Xcode 3.2.x IDE?

只是覆盖文件似乎有点冒险。

推荐答案

首先 - 你是指基于LLVM 2.6的clang 1.0。没有clang 2.6,只有一个clang 1.0基于LLVM 2.6。使用LLVM 2.6发布的clang与使用Xcode 3.2的clang相同。 (请参见维基百科:在2009年10月23日,Clang 1.0随同LLVM 2.6一起发布第一次;我也从个人经验知道这一点。)

First off – you're referring to clang 1.0 based on LLVM 2.6. There is no clang 2.6, only a clang 1.0 based on LLVM 2.6. The clang issued with LLVM 2.6 is the same as the one with Xcode 3.2. (see Wikipedia: "On October 23, 2009 Clang 1.0 was released along with LLVM 2.6 for the first time"; I also know this from personal experience).

其次 - 你可以集成任何版本的铛,即使你从铛的SVN构建。为此,我有一个.xcconfig文件(一个带有.xcconfig后缀的纯文本文件),包含两个设置:

Secondly – you can integrate any version of clang, even one you build from clang's SVN. To do so, I have a .xcconfig file (a plain text file with the .xcconfig suffix) with two settings included:

GCC_VERSION = com.apple.compilers.llvm.clang.1_0
CC = /Users/jpo/Development/oss/llvm/Debug/bin/clang

然后,我将xcconfig文件添加到我的项目中(因为它包含了我喜欢打开的一些其他警告,例如Peter Hosey recommended )。然后,在我的项目的构建设置选项卡的右下角,我告诉它'基于'我的xcconfig文件的名称。

Then, I add the xcconfig file to my project (because it contains some other warnings I like to turn on, such as the ones Peter Hosey recommends). Then, in the bottom right of the build settings tab for my project I tell it to be 'Based on' the name of my xcconfig file.

这一切都很好,因为你可以只保留文件从ang SVN在您的驱动器上的目录,并建立它,你的Xcode项目将使用总是使用你最新的版本,因为它总是在该路径。当然,建筑ang本身是一个耗时的过程,但它仍然真的,真的,使用出色的技术。

This all works out great, because then you can just keep the files from clang SVN in a directory on your drive, and build it, and your Xcode projects will use always use your latest built version since it always will be at that path. Of course, building clang itself is a time-consuming process, but its still really, really, cool to be using bleeding-edge technology.

这篇关于使用LLVM Clang 2.6和Xcode 3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆