New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polly requires additional linkages on darwin #26766
Comments
The proposed change of... Index: lib/CMakeLists.txt--- lib/CMakeLists.txt (revision 259304)
bootstraps fine on x86_64-apple-darwin15 using current trunk built with -DBUILD_SHARED_LIBS:BOOL=ON and passes the polly test suite. Testing Time: 15.90s The same change is also needed in 3.8 branch. |
Also confirmed that the proposed change applied to 3.8 branch also bootstraps and passes the polly test suite without regressions. |
I committed this patch in r259332. This should resolve the issue. Thanks Jack! |
Confirmed that current trunk now passes the Polly test suite when built on darwin with -DBUILD_SHARED_LIBS:BOOL=ON. Testing Time: 8.86s |
Can you please back port r259332 to 3.8 branch? It would eliminate the need for any patching of polly on darwin. Thanks in advance. |
Extended Description
The Polly shared library requires additional linkages on darwin. The current linkage in lib/CMakeLists.txt is limited to....
if (BUILD_SHARED_LIBS)
target_link_libraries(Polly
LLVMSupport
LLVMCore
LLVMScalarOpts
LLVMInstCombine
LLVMTransformUtils
LLVMAnalysis
LLVMipo
LLVMMC
)
link_directories(
${LLVM_LIBRARY_DIR}
)
endif()
However darwin requires the additional linkages of...
LLVMBitReader
LLVMMCParser
LLVMObject
LLVMProfileData
LLVMTarget
LLVMVectorize
as the darwin requires all of the weak undefined symbols in a library to be resolved when linking it against an executable (unless -Wl,-undefined,dynamic_lookup is used to override the default behavior of -Wl,-undefined,error).
The text was updated successfully, but these errors were encountered: