This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Support linking ScopPassManager against LLVM dylib
ClosedPublic

Authored by mgorny on Aug 5 2020, 1:25 AM.

Details

Summary

Link ScopPassManager to LLVM dylib target if LLVM_LINK_LLVM_DYLIB
is enabled. This fixes build failures on systems where static LLVM
libraries are not installed.

Diff Detail

Event Timeline

mgorny created this revision.Aug 5 2020, 1:25 AM
mgorny requested review of this revision.Aug 5 2020, 1:25 AM
Meinersbur added inline comments.Aug 5 2020, 7:36 AM
polly/unittests/ScopPassManager/CMakeLists.txt
4

Should this depend on LLVM_LINK_LLVM_DYLIB instead?

mgorny updated this revision to Diff 283255.Aug 5 2020, 8:37 AM
mgorny marked an inline comment as done.
mgorny edited the summary of this revision. (Show Details)

Updated to use LLVM_LINK_LLVM_DYLIB.

polly/unittests/ScopPassManager/CMakeLists.txt
4

Sure.

Which configurations have you tested this with?

LLVM_LINK_LLVM_DYLIB is also used in AddLLVM.cmake, but I am not sure how it is propagated in a pre-installed LLVM (i.e. LLVMConfig.cmake).

Which configurations have you tested this with?

Only Gentoo install. Do you happen to know whom to CC to get better test coverage?

LLVM_LINK_LLVM_DYLIB is also used in AddLLVM.cmake, but I am not sure how it is propagated in a pre-installed LLVM (i.e. LLVMConfig.cmake).

I've grepped it there and it seems to work fine.

Which configurations have you tested this with?

Only Gentoo install. Do you happen to know whom to CC to get better test coverage?

tHat would probably be me. I am running three Polly buildbots, but we don't have enough resources to test all configurations. Previously, I was testing them manually. See https://groups.google.com/d/msg/polly-dev/vxumPMhrSEs/uE7OfPojCwAJ

LLVM_LINK_LLVM_DYLIB is also used in AddLLVM.cmake, but I am not sure how it is propagated in a pre-installed LLVM (i.e. LLVMConfig.cmake).

I've grepped it there and it seems to work fine.

Asking because there's no LLVM_LINK_LLVM_DYLIB=OFF in my install config without dylib.

polly/unittests/ScopPassManager/CMakeLists.txt
4–9

I think adding libLLVM as dependency is not necessary because if using a dylib, it will be a dependency of Polly anyway.

mgorny updated this revision to Diff 283470.Aug 5 2020, 6:51 PM

Do not add dylib explicitly.

mgorny marked an inline comment as done.Aug 5 2020, 6:51 PM
mgorny added inline comments.
polly/unittests/ScopPassManager/CMakeLists.txt
4–9

You are indeed correct.

This revision is now accepted and ready to land.Aug 6 2020, 7:36 PM
mgorny marked an inline comment as done.Aug 6 2020, 9:46 PM

Thanks!

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 9:47 PM