1CM

  

Clang+LLVM 在mingw32+msys快速安装

LLVM 与 Clang 介绍
LLVM 是 Low Level Virtual Machine 的简称,这个库提供了与编译器相关的支持,能够进行程序语言的编译期优化、链接优化、在线编译优化、代码生成。
Clang 是一个 C++ 编写、基于 LLVM、发布于 LLVM BSD 许可证下的 C/C++/Objective C/Objective C++ 编译器,其目标(之一)就是超越 GCC。
Clang 的特性
快 内存占用小 诊断信息可读性强 GCC 兼容性 设计清晰简单,容易理解,易于扩展增强 基于库的模块化设计

官方主页 http://llvm.org/
LLVM 3.1 Release Notes http://llvm.org/releases/3.1/docs/ReleaseNotes.html
Clang 3.1 Release Notes http://llvm.org/releases/3.1/docs/ClangReleaseNotes.html
下载地址 http://llvm.org/releases/download.html
Experimental Clang Binaries for Mingw32/x86 (69M)下载地址
http://llvm.org/releases/3.1/clang+llvm-3.1-i386-mingw32-EXPERIMENTAL.tar.bz2

若感兴趣的可以下载源代码自己重新编译,不过需要很长时间
./configure --prefix=/mingw --enable-optimized --disable-assertions
make
make install

测试写个hello.c
#include "stdio.h"
int main(){
printf("Hello Clang!!");
return 0;}
clang -v hello.c

posted on 2012-09-08 11:29 1CM 阅读(889) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理