[PATCH] D71611: [cmake] Add llvm-locstats to LLVM_TEST_DEPENDS

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 02:35:10 PST 2019


dstenb added a comment.

In D71611#1790894 <https://reviews.llvm.org/D71611#1790894>, @DavidSpickett wrote:

> How is this change supposed to interact with LLVM_BUILD_TOOLS?
>  "LLVM_BUILD_TOOLS: Build the LLVM tools. If OFF, just generate build targets."
>
> We have a downstream build that sets this OFF, then builds llvm-mc only. You can reproduce the same thing with upstream llvm:
>
>   $ cmake -G Ninja ../llvm-project/llvm/ -DLLVM_BUILD_TOOLS=OFF
>
>   CMake Error at cmake/modules/AddLLVM.cmake:1457 (add_dependencies):
>      The dependency target "llvm-locstats" of target "check-llvm-tools-llvm-rc"
>      does not exist.
>    Call Stack (most recent call first):
>      cmake/modules/AddLLVM.cmake:1509 (add_lit_target)
>      test/CMakeLists.txt:179 (add_lit_testsuites)
>    <repeats for lots of targets>
>
> Perhaps build tools isn't defining the targets as it claims.


Oh, okay!

I see that all other utils/ dependencies in LLVM_TEST_DEPENDS are C++ programs, so they use add_llvm_utility in their CMakeLists.txt, instead of a custom target as is used for llvm-locstats.

I'm unfortunately not very well-versed with LLVM's build system, so I don't have any good fix for this at the moment. I guess that breaking cmake invocations is worse than the issue this patch attempted to fix, so feel free to revert this, or let me know and I'll do that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71611/new/

https://reviews.llvm.org/D71611





More information about the llvm-commits mailing list