[llvm-dev] Unable to get started with LLI and LLC
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Nov 30 02:03:31 PST 2020
Hi Jagrat,
On Sun, 29 Nov 2020 at 14:15, Jagrat Patkar via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I was just getting started with LLVM to create a small compiler of my own, while skimming through the docs came across the use of lli and llc in the development process, have successfully installed clang but somehow the lli and llc command are not working, I have a macOS it is showing the error "command not found" , if I try to build lli and llc with CMake it throws this error
>
> CMake Error at CMakeLists.txt:23 (add_llvm_tool):
> Unknown CMake command "add_llvm_tool".
It sounds like you might be trying to point CMake at the llc or lli
tool's own directory (/path/to/llvm-project/llvm/tools/llc). Instead
CMake has to be told to start from /path/to/llvm-project/llvm, and
then both llc and lli are targets you can ask it to build.
There's some documentation on how to build LLVM (what options you
might want and so on). https://llvm.org/docs/GettingStarted.html, and
https://llvm.org/docs/CMake.html.
Cheers.
Tim.
More information about the llvm-dev
mailing list