[PATCH] D51986: Fixes for `LLVM_LINK_LLVM_DYLIB` && Polly.

Richard Diamond via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 12 16:21:28 PDT 2018


DiamondLovesYou added a comment.

In https://reviews.llvm.org/D51986#1232440, @beanz wrote:

> After line 18 in this file you could do something like:
>
>   if(WITH_POLLY)
>   list(APPEND LLVM_LINK_COMPONENTS Polly)
>   endif()
>
>
> Then you can get rid of the `target_link_libraries` call.


It turns out this can't be done. Consider the `LLVMLTO` component and its loadable form, `LTO`. Contrast this with Polly: `Polly` is the component and `LLVMPolly` is the loadable module.
This naming convention disagreement prevents Polly's use as a component while also not breaking LTO, I've found (Chris, is this what you were referring to?).
Specifically, CMake fails because executables can't link to a `MODULE_LIBRARY` target when trying to link `LLVMPolly`.

I think the Polly naming scheme should be changed to match LTO's scheme, rather than vice versa, but not my call.


Repository:
  rC Clang

https://reviews.llvm.org/D51986





More information about the cfe-commits mailing list