构建LLVM时,必须在配置期间启用LLVM C ++后端。
默认情况下,它在configure
(自动工具)构建中启用,但在Windows上构建时,在CMake构建中未启用。您可以通过在配置CMake时设置适当的标志来启用它。有关更多信息,请参见此页面。
引用:
LLVM_TARGETS_TO_BUILD:STRING以
分号分隔的要构建目标列表,或用于构建所有目标的所有目标列表。区分大小写。对于Visual C
++,默认值为X86。在其他情况下,默认为全部。示例:-DLLVM_TARGETS_TO_BUILD =“ X86; PowerPC”。
更新
由于
version 3.9CppBackend不再是有效的目标。由于生成的代码存在一些问题,因此已将其从代码中删除。
检查此提交
Remove bit-rotten CppBackend.This backend was supposed to generate C++ pre which will re-constructthe LLVM IR passed as input. This seems to me to have very marginalusefulness in the first place.However, the pre has never been updated to use IRBuilder, which makesits current value negative -- people who look at the output may besteered to use the *wrong* C++ APIs to construct IR.Furthermore, it's generated pre that doesn't compile since at least2013.Differential Revision: http://reviews.llvm.org/D19942git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268631 91177308-0d34-0410-b5e6-96231b3b80d8



