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遍中编译器的堆空间不足错误提示。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM