[llvm-dev] Unable to get started with LLI and LLC

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 18:29:41 PST 2020


The following should build just llc and lli and put them in the bin
subdirectory in your build directory.

cmake -G Ninja ../llvm
ninja llc lli

~Craig


On Wed, Dec 2, 2020 at 6:19 PM Jagrat Patkar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> If I execute the following command from the *build directory*
> (llvm-project/build)
>
>
> *cmake -G Ninja ../llvm/tools/llc *
>
> then I am getting the following error
>
> *CMake Error: The source
> "/Users/jagratpatkar/Desktop/ComputerScience/llvm-project/llvm/tools/llc/CMakeLists.txt"
> does not match the source
> "/Users/jagratpatkar/Desktop/ComputerScience/llvm-project/llvm/CMakeLists.txt"
> used to generate cache.  Re-run cmake with a different source directory.*
>
> Thanks!
> Jagrat Patkar.
>
>
> On Wed, Dec 2, 2020 at 5:55 PM Tim Northover <t.p.northover at gmail.com>
> wrote:
>
>> On Wed, 2 Dec 2020 at 02:09, Jagrat Patkar <jagratpatkar at gmail.com>
>> wrote:
>> > I tried this out inside llvm-project/build
>> > cmake -G Ninja  tools/lli
>> > cmake -G Ninja  tools/llc
>> >
>> > but none of it worked, although the subdirectories do exist under the
>> llvm-project/build/tools/llc or lli
>>
>> Yep, those two are never going to work. The CMakeLists.txt in those
>> directories aren't self-contained.
>>
>> > cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lli;llc" ../llvm  this
>> command which resulted in the build directory getting loaded with many
>> subdirectories including tools directory containing lli and llc. But still
>> it didn't enable lli and llc even after mentioning it in the
>> ENABLE_PROJECTS flag
>>
>> You don't need lli or llc in LLVM_ENABLE_PROJECTS because they're part
>> of baseline LLVM. But other than that it should have worked. What
>> error message did you get when you tried running "ninja llc" after
>> that CMake command?
>>
>> Cheers.
>>
>> Tim.
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201202/cba1e65a/attachment.html>


More information about the llvm-dev mailing list