[polly][cmake] need to link dependent LLVM libs on darwin?
David Fang
fang at csl.cornell.edu
Fri Mar 7 06:38:16 PST 2014
Hi,
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)
The final linked result for me:
% otool -L lib/LLVMPolly.so
lib/LLVMPolly.so:
/usr/local/experimental/isl/lib/libisl.10.dylib (compatibility version 13.0.0, current version 13.1.0)
@loader_path/../lib/libLLVMPollyLib.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMipo.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMScalarOpts.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMInstCombine.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMVectorize.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMTransformUtils.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMipa.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMAnalysis.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMTarget.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMMC.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMObject.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMBitReader.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMCore.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../lib/libLLVMSupport.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/sw/lib/c++/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
David
--
David Fang
http://www.csl.cornell.edu/~fang/
-------------- next part --------------
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index dc66491..ceb6b3d 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -74,6 +74,13 @@ add_polly_library(LLVMPollyLib
${POLLY_PLUTO_FILES}
)
+target_link_libraries(LLVMPollyLib
+ LLVMSupport
+ LLVMScalarOpts
+ LLVMTransformUtils
+ LLVMipo
+)
+
add_polly_loadable_module(LLVMPolly
PollyModule.cpp
)
More information about the llvm-commits
mailing list