Page MenuHomePhabricator

[cmake] Add dependency on llvm-dwarfdump to llvm-locstats
ClosedPublic

Authored by DavidSpickett on Dec 19 2019, 7:08 AM.

Details

Summary

Though llvm-locstat is a "util" it requires llvm-dwarfdump
to be useful. So what happens now is that unless LLVM_BUILD_TOOLS
is ON llvm-locstats won't be part of the "all" target.

However given that it requires llvm-dwarfdump, this is less
confusing/build time consuming than suddenly having llvm-dwarfdump
build when all other tools are disabled.

Diff Detail

Event Timeline

DavidSpickett created this revision.Dec 19 2019, 7:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2019, 7:08 AM

Please make sure the tool name is llvm-locstats instead of llvm-covstat.

(This patch is follow up for the https://reviews.llvm.org/D71695, where is the rest of the conversation).

llvm/utils/llvm-locstats/CMakeLists.txt
12

Please describe, once again, why you decided to use the LLVM_BUILD_UTILS instead of the LLVM_BUILD_TOOLS here.

DavidSpickett edited the summary of this revision. (Show Details)
DavidSpickett marked an inline comment as done.Dec 19 2019, 7:49 AM

Please make sure the tool name is llvm-locstats instead of llvm-covstat.

Done.

llvm/utils/llvm-locstats/CMakeLists.txt
12

I was testing both and got confused along the way. LLVM_BUILD_TOOLS is what I intended.

Reasoning being that though llvm-locstats requires llvm-dwarfdump, it would be a bigger problem to start building llvm-dwarfdump when LLVM_BUILD_TOOLS is OFF, than it is to not build llvm-locstats when LLVM_BUILD_UTILS is ON.

(from the point of view of someone trying to trim their build time)

djtodoro accepted this revision.Dec 19 2019, 7:52 AM

Thanks for doing this! Looks good to me now!

llvm/utils/llvm-locstats/CMakeLists.txt
12

That is why I asked this. :)

This revision is now accepted and ready to land.Dec 19 2019, 7:52 AM
This revision was automatically updated to reflect the committed changes.

Have reverted due to failure on lld-x86_64-ubuntu-fast buildbot, will investigate and re-land.