Im creating a custom programming language using python, PLY as lexer and parser, and LLVMlite as low level intermediate language to do code generation. I have installed PLY and LLC using Python pip
I use LLC to create a object file output.o, and GCC to create the final executable file as follows.
$ llc -filetype=obj output.ll
$ gcc output.o -o output
When im executing llc -filetype=obj output.ll
i get
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
I have spent hours on this but cant figure out. What is wrong?
The PyPi package llc has nothing to do with LLVM's
llc
tool. You can't install the latter viapip
because it's not a Python package. You need to install the LLVM tools to get it.