将 LLVM Clang 4.x.x/5.x.x/6.x.x 集成到 Visual Studio 2017 [英] Integrate LLVM Clang 4.x.x / 5.x.x / 6.x.x into Visual Studio 2017

查看:26
本文介绍了将 LLVM Clang 4.x.x/5.x.x/6.x.x 集成到 Visual Studio 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

official LLVM 4.0 build for Windows 与 Visual Studio 集成到 Visual Studio 2015.不幸的是它仍然不支持 Visual Studio 2017.

The official LLVM 4.0 build for Windows integrates with Visual Studio up to Visual Studio 2015. Unfortunately it still doesn't support Visual Studio 2017.

当您尝试将项目的Platform Toolset设置为LLVM-vs2014时,会弹出错误.

When you try to set the Platform Toolset of a project to LLVM-vs2014, it pops up an error.

你知道有什么方法可以让它工作吗?

Do you know any way to make it work?

更新

在 2018 年,LLVM 6.0 官方仍然不支持与 Visual Studio 2017(版本 15.X.X)的集成,仅支持与 Visual Studio 2015(版本 14.X.X)工具集的集成.

In 2018, LLVM 6.0 officially still doesn't support integration with Visual Studio 2017 (version 15.X.X), only with the Visual Studio 2015 (version 14.X.X) toolset.

推荐答案

终于找到了一个出色的 GitHub 存储库,带有所需的 MSBuild 平台工具集,将 LLVM clang 5.0.0 集成到 Visual Studio 2017.按照 README 文件的说明,您将拥有两个新的平台工具集 LLVM-vs2017LLVM-vs2017_xp.问题解决了.

Finally, I found a brilliant GitHub repo with the required MSBuild platform toolsets which integrates LLVM clang 5.0.0 into Visual Studio 2017. After following the instructions of the README file, you will have two new platform toolsets LLVM-vs2017 and LLVM-vs2017_xp. Problem solved.

更新

我做了一个 fork 更新了LLVM 6.0.0 并通过提供 LLVM/clang 的包含和库路径来提供更好的集成.

I made a fork which is updated for LLVM 6.0.0 and provides better integration by providing include and library paths of LLVM/clang.

感谢 Royi,他们意识到原来的 .prop 文件是为 LLVM 5.0 显式定制的,它错过了添加正确的 lib ($(LLVMInstallDir)lib) 和 include ($(LLVMInstallDir)libclang6.0.0include) 文件夹.

Thanks to Royi, who realized that the original .prop files are explicitly tailored for LLVM 5.0 and it misses adding the proper lib ( $(LLVMInstallDir)lib) and include ($(LLVMInstallDir)libclang6.0.0include) folders.

这篇关于将 LLVM Clang 4.x.x/5.x.x/6.x.x 集成到 Visual Studio 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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