[PATCH] D33299: [Polly][CMake] Use the CMake Package instead of llvm-config in out-of-tree builds

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 09:31:49 PDT 2017


philip.pfaffe added a comment.

In https://reviews.llvm.org/D33299#763275, @Meinersbur wrote:

> In https://reviews.llvm.org/D33299#762008, @philip.pfaffe wrote:
>
> >
>
>
> Is it possible to add some checks for whether LLVM and Polly are compatible?


There's the compile-time check for EnableABIBreakingChecks, but I don't think that'll help in this case.

> In this case it was Release LLVM and Debug Polly. Because with Release-Release, I get the following error (for almost every test):
>  [...]
>  The revisions are compatible, the in-LLVM-tree builds work well. It also works with the previous llvm-config based trunk (even mixes of Release/Debug build). Any other idea?

I have the strong suspicion that this is still a version incompatibility. My patch is missing bigger changes to test/CMakeLists.txt, which still uses LLVM_INSTALL_ROOT. Hence, I think your test-suite is picking up your distribution version of opt. I'll drop the distinction there.

At this point, it might be worthwhile to consider getting rid of the 'copy FileCheck to TOOLS_BINARY_DIR' requirement. CMake has a nice feature for that, which is `find_program()`. It autodetects programs and further makes this configurable. Plugging this into the lit test-suite is however not super beautiful. Options I see are:

1. From the found program, determine the PATH of the program and hand it into the lit config. This might create potentially confusing results, if tools by the same name are in multiple paths, and one in a path not specified by the user wins.
2. Pass the actual found programs into the lit config using substitutions. That would mean in all existing testcases replace (e.g.), opt with %opt.

I'm slightly in favor of the first option, because we don't have to adapt //all// the testcases, Thoughts?


https://reviews.llvm.org/D33299





More information about the llvm-commits mailing list