LLC Compiler不能被识别为cmdlet、函数、脚本文件或可操作程序的名称



我正在创建一个自定义编程语言,使用python, PLY作为词法分析器和解析器,LLVMlite作为低级中间语言来进行代码生成。我已经安装了PLY和LLC使用Python pip

我使用LLC来创建一个对象文件输出。

$ llc -filetype=obj output.ll
$ gcc output.o -o output

当我执行llc -filetype=obj output.ll时,我得到

llc : The term 'llc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,  
verify that the path is correct and try again.
At line:1 char:1
+ llc -filetype=obj output.ll
+ CategoryInfo          : ObjectNotFound: (llc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

我花了几个小时在这个问题上,但还是想不出来。怎么了?

PyPi包llc与LLVM的llc工具无关。你不能通过pip安装后者,因为它不是一个Python包。你需要安装LLVM工具来获取它。

相关内容

最新更新