[PATCH] D71695: [cmake] Include the llvm-locstats target when utils and tools are not being built.
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 03:34:00 PST 2019
djtodoro added a comment.
In D71695#1791002 <https://reviews.llvm.org/D71695#1791002>, @djtodoro wrote:
> In D71695#1790979 <https://reviews.llvm.org/D71695#1790979>, @DavidSpickett wrote:
>
> > In D71695#1790971 <https://reviews.llvm.org/D71695#1790971>, @djtodoro wrote:
> >
> > > Sorry for the confusion. May be the `llvm/CMakeLists.txt` is better place to address this?
> > >
> > > llvm/CMakeLists.txt:
> > >
> > > if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS)
> > > add_subdirectory(utils/llvm-locstats)
> > > endif()
> >
> >
> > Changing it to:
> >
> > if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS AND LLVM_BUILD_TOOLS)
> > add_subdirectory(utils/llvm-locstats)
> >
> >
> > Doesn't help the issue, but maybe I'm missing your point here?
>
>
> Yes that was my point. Should we add the `AND LLVM_BUILD_TOOLS` part in both of the `llvm/CMakeLists.txt` and `llvm/utils/llvm-locstats/CMakeLists.txt`?
This won't solve the problem you reported..
The problem with this patch is that the llvm-locstats will be created even the llvm-dwarfdump is not being built. The llvm-locstats tool is using JSON generated by `llvm-dwarfdump --statistics` and there is no point to create the tool if we did not make the dwarfdump.
Perhaps, we should add the llvm-dwarfdump target as dependency for the llvm-locstats target. WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71695/new/
https://reviews.llvm.org/D71695
More information about the llvm-commits
mailing list