- 安装llvm debug版本
release版本的安装过程可以参考https://blog.youkuaiyun.com/vincentuva/article/details/82993563
在安装使用debug版本时,只需要进入到build目录(由用户自己创建)下,并且进行编译:
cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_INCLUDE_TESTS=OFF ../
然后再进行make & make install。
到此便可完成llvm的debug版本安装。
在编译的最后过程里面会出现下面的错误(这里并没有把所有的错误都粘贴出来):
collect2: fatal error: ld terminated with signal 9 [已杀死]
compilation terminated.
tools/opt/CMakeFiles/opt.dir/build.make:408: recipe for target 'bin/opt' failed
make[2]: *** [bin/opt] Error 1
make[2]: *** Deleting file 'bin/opt'
CMakeFiles/Makefile2:21099: recipe for target 'tools/opt/CMakeFiles/opt.dir/all' failed
make[1]: *** [tools/opt/CMakeFiles/opt.dir/all] Error 2
collect2: fatal error: ld terminated with signal 9 [已杀死]
compilation terminated.
tools/llc/CMakeFiles/llc.dir/build.make:245: recipe for target 'bin/llc' failed
make[2]: *** [bin/llc] Error 1
make[2]: *** Deleting file 'bin/llc'
CMakeFiles/Makefile2:21