[polly][cmake] need to link dependent LLVM libs on darwin?
tobias at grosser.es
Fri Mar 7 08:25:32 PST 2014
On 03/07/2014 03:38 PM, David Fang wrote:
> Current Polly trunk fails to (cmake+shared) link on darwin(8),
> complaining about undefined references to the LLVM library. The
> attached patch explicitly links the dependent LLVM libraries with the
> missing symbols. After the recent unification of
> libLLVMPollyLib.$shlibext, this is the only difference that remains
> between trunk and my local trees.
> Does this patch seem right? (should test cmake+shared build on
> other platforms)
I removed this explicit linking because it causes troubles on Linux.
Specifically, if we link those libraries into Polly and they are already
in LLVM all static initializers are run twice. This means, all command
line categories are added twice, which causes the relevant asserts to
fail. Apparently the behavior on Darwin is different. If anybody has an
idea what would be the the _right_ solution, I would be very interested.
If we do not find the _right_ solution, we could make this change darwin
More information about the llvm-commits