This is necessary to make sure Polly's dependency on LLVMTarget is properly
registered. Without this change, we got link time failures in bugpoint,
which apparently does not require llvm::TargetRecip::TargetRecip, which however
is needed by Polly ACC.
Registering library dependences for Polly.a will break LLVMPolly.so, hence we
disable the build of LLVMPolly.so when using LINK_POLLY_INTO_TOOLS.
AFAIU this gives priority of linking against libLLVM.so over linking agains the individual LLVM components. Since there is a separate option LLVM_BUILD_LLVM_DYLIB, this looks like the right thing to do, but could land in a separate commit.
(Although, I think the combination BUILD_SHARED_LIBS and LLVM_LINK_LLVM_DYLIB is not something that is supposed to work. cmake stop with the error
)