This is an archive of the discontinued LLVM Phabricator instance.

Only build lit-cpuid if the target doesn't already exist
AbandonedPublic

Authored by lanza on Jul 16 2019, 9:42 PM.

Details

Reviewers
xiaobai
Summary

add_llvm_uttility causes targets to be exported to LLVMConfig.cmake.
Building lldb standalone can cause this to be both imported and then
attempted to build and thus fail.

Event Timeline

lanza created this revision.Jul 16 2019, 9:42 PM

Am I guessing correctly that this happens when you installed combined llvm+lldb build, and then try to build lldb standalone against that?

lanza added a comment.Jul 17 2019, 6:28 PM

Am I guessing correctly that this happens when you installed combined llvm+lldb build, and then try to build lldb standalone against that?

Precisely. Not a common problem, but the build does fail when this is the case.

To be honest, I don't think this is the correct solution. After all, lit-cpuid isn't installed, is it? (or are you using LLVM_INSTALL_UTILS?)

lanza abandoned this revision.Jul 18 2019, 5:47 PM

So add_llvm_utility exports it's target if LLVM_DISTRIBUTION_COMPONENTS doesn't exist. So I guess the better solution would just be setting that.