Skip to content
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

Closed
llvmbot opened this issue Jan 30, 2016 · 5 comments
Closed

Polly requires additional linkages on darwin #26766

llvmbot opened this issue Jan 30, 2016 · 5 comments
Labels
bugzilla Issues migrated from bugzilla polly

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 30, 2016

Bugzilla Link 26392
Resolution FIXED
Resolved on Feb 01, 2016 11:20
Version unspecified
OS MacOS X
Blocks #26433
Attachments add missing linkages to satisfy darwin linker strictness on undefined weak symbols
Reporter LLVM Bugzilla Contributor
CC @tobiasgrosser

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).

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 30, 2016

The proposed change of...

Index: lib/CMakeLists.txt

--- lib/CMakeLists.txt (revision 259304)
+++ lib/CMakeLists.txt (working copy)
@@ -66,6 +66,12 @@
LLVMAnalysis
LLVMipo
LLVMMC

  • LLVMBitReader
  • LLVMMCParser
  • LLVMObject
  • LLVMProfileData
  • LLVMTarget
  • LLVMVectorize
    )
    link_directories(
    ${LLVM_LIBRARY_DIR}

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
Expected Passes : 572
Expected Failures : 17
Unsupported Tests : 7
[100%] Built target check-polly

The same change is also needed in 3.8 branch.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 30, 2016

Also confirmed that the proposed change applied to 3.8 branch also bootstraps and passes the polly test suite without regressions.

@tobiasgrosser
Copy link
Contributor

I committed this patch in r259332. This should resolve the issue.

Thanks Jack!

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 1, 2016

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
Expected Passes : 572
Expected Failures : 17
Unsupported Tests : 7
[100%] Built target check-polly

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 1, 2016

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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla polly
Projects
None yet
Development

No branches or pull requests

2 participants