[Polly] Support linking ScopPassManager against LLVM dylib

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.

Differential Revision: https://reviews.llvm.org/D85281
This commit is contained in:
Michał Górny 2020-08-05 10:22:32 +02:00
parent c530539bad
commit 96b02808af
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
llvm_map_components_to_libnames(llvm_libs Passes Core Analysis)
add_polly_unittest(ScopPassManagerTests
PassManagerTest.cpp
)
target_link_libraries(ScopPassManagerTests PRIVATE ${llvm_libs})
if (NOT LLVM_LINK_LLVM_DYLIB)
llvm_map_components_to_libnames(llvm_libs Passes Core Analysis)
target_link_libraries(ScopPassManagerTests PRIVATE ${llvm_libs})
endif()