我使用 python 创建自定义编程语言,PLY 作为词法分析器和解析器,LLVMlite 作为低级中间语言来进行代码生成。我已经使用 Python pip 安装了 PLY 和 LLC
我使用 LLC 创建目标文件 output.o,并使用 GCC 创建最终的可执行文件,如下所示。
$ 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
我已经花了几个小时在这上,但无法弄清楚。怎么了?