[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 17 14:44:48 PDT 2017


philip.pfaffe created this revision.
Herald added a subscriber: mgorny.

As of now, Polly uses llvm-config to set up LLVM dependencies in an out-of-tree build.

This is problematic for two reasons:

1. Right now, in-tree and out-of-tree builds in fact do different things. E.g., in an in-tree build, libPolly depends on a handful of LLVM libraries, while in an out-of-tree build it depends on all of them. This means that we often need to treat both paths seperately.
2. I'm specifically unhappy with the way libPolly is linked right now, because it just blindly links against all the LLVM libs. That doesn't make a lot of sense. For instance, one of these libs is LLVMTableGen, which contains a command line definition of a -o option. This means that I can not link an out-of-tree libPolly into a tool which might want to offer a -o option as well.

This patch (mostly) drop the use of llvm-config  in favor of LLVMs exported cmake package. However, building Polly with unittests requires access to the gtest sources (in the LLVM source tree). If we're building against an LLVM installation, this source tree is unavailable and must specified. I'm using llvm-config to provide a default in this case.


https://reviews.llvm.org/D33299

Files:
  CMakeLists.txt
  lib/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33299.99351.patch
Type: text/x-patch
Size: 9620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170517/9b4aa636/attachment.bin>


More information about the llvm-commits mailing list