我正在尝试使用 CMake 在 Windows 上的 MinGW 下构建 LLVM OCaml 绑定(bind)。我对绑定(bind)目录中的 LLVMBuild.txt 进行了一些微调,但没有成功。我如何构建它们?
编辑:回答 ygrek 的问题:
第一次尝试:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
cd ..
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make
我意识到 llvm/bindings/ocaml
没有被构建。然后,我将许多目录中的 LLVMBuild.txt
文件与 CMake 构建系统连接起来。 llvm/bindings/LLVMBuild.txt
不包含任何构建子目录的说明,所以我添加了它们:
[common]
subdirectories = ocaml
llvm/bindings/ocaml/LLVMBuild.txt
也没有 LLVMBuild.txt
所以我加了一个:
[component_0]
type = Group
name = OCamlBindings
parent = Bindings
我尝试构建它,但没有构建 OCaml 绑定(bind)。我认为这是因为在任何 ocaml
子目录中都没有 LLVMBuild.txt
。我曾考虑将 LLVMBuild.txt
文件添加到所有 ocaml
子目录,但意识到我不知道它们的依赖项是什么或如何指定它们。
如果不可能或者有人已经完成这项工作,我不想漫无目的地追求它。 CMake 构建系统和绑定(bind)目录之间似乎存在脱节。
最佳答案
不是真正的答案,但仍然是。
llvm/bindings/Makefile.ocaml
阅读开头的注释
An ocaml library is a unique project type in the context of LLVM, so rules are here rather than in Makefile.rules.
似乎表明不支持使用 cmake 构建 ocaml 绑定(bind)..
关于windows - 使用 CMake 在 MinGW 下的 Windows 上构建 LLVM OCaml 绑定(bind)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9562195/