我正在尝试编译目录中的Hello示例lib/Transforms/Hello
,它基本上是LLVM传递的Hello World,但是当我尝试使用make编译它时,我收到以下错误.
../../../Makefile.common:61: ../../../Makefile.config: No such file or directory
../../../Makefile.common:69: /Makefile.rules: No such file or directory
make: *** No rule to make target `/Makefile.rules'. Stop.
Run Code Online (Sandbox Code Playgroud)
知道问题是什么以及如何解决?
如果您按照说明构建了 LLVM + Clang,则Hello
示例应该已经构建完毕。转到lib/Transforms/Hello
构建目录(您运行的位置configure
,然后make
)。那里应该有一个Debug+Asserts
(或您编译的任何配置)。你也可以make
从那里再次逃跑。
一般来说,您总是make
从构建目录,而不是源目录。构建目录已正确设置所有 Makefile。