Visual Studio 2017 编译Clang

到http://releases.llvm.org/download.html下载LLVM和clang源码

比如:

http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz

http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz

将llvm-6.0.0.src.tar.xz解压到D:\LLVM

将cfe-6.0.0.src.tar.xz解压到D:\LLVM\tools\

将cfe-6.0.0.src重命名位clang

到https://cmake.org/download/下载cmake,双击cmake-gui,在where is source code处填写D:\LLVM

where to build the binaries 处填写一个生成vs解决方案的地方

点击configure,填入如下信息,

 

选生成器的时候,带着win64则生成64位的解决方案,不带则生成32解决方案。

host=x64建议填写,否则编译的时候会出现

类似“The problem arises when the build process gets to the "clangBasic" project. It fails on line 254 of "identifiertable.cpp," which I will attach. All other projects that depend on clangBasic fail. This bug only arises on the Release configuration.”

的fatal error C1002: 在第2遍中编译器的堆空间不足错误提示。

 

转载于:https://www.cnblogs.com/hushuangpu/p/9080193.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值