This is an archive of the discontinued LLVM Phabricator instance.

Fix integration of pass plugins with llvm dylib
ClosedPublic

Authored by serge-sans-paille on Feb 12 2020, 12:03 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript

I don't know enough about the cmake and dylib build to properly review this. Maybe Tom can help?

Please add a mention of https://github.com/llvm/llvm-project/issues/120 / https://bugs.llvm.org/show_bug.cgi?id=44870 in the change description.

Need to pull in the symbols, provide the appropriate anchor

tested with

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/inst -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_LLVM_DYLIB=ON   -DLLVM_POLLY_LINK_INTO_TOOLS=ON -DLLVM_TOOL_POLLY_BUILD=ON -DPOLLY_BUNDLED_ISL=ON ../llvm && make -j30  && nm -DC lib/libLLVM-11git.so | grep getPollyPluginInfo
serge-sans-paille edited the summary of this revision. (Show Details)Feb 12 2020, 2:15 AM

Also pass with

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/inst -DLLVM_LINK_LLVM_DYLIB=OFF -DLLVM_BUILD_LLVM_DYLIB=OFF   -DLLVM_POLLY_LINK_INTO_TOOLS=ON -DLLVM_TOOL_POLLY_BUILD=ON -DPOLLY_BUNDLED_ISL=ON ../llvm && make -j30 && make check-polly -j20

(i.e. when no using DYLIB but still linking polly statically)

and

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/inst -DLLVM_LINK_LLVM_DYLIB=OFF -DLLVM_BUILD_LLVM_DYLIB=OFF   -DLLVM_POLLY_LINK_INTO_TOOLS=OFF -DLLVM_TOOL_POLLY_BUILD=ON -DPOLLY_BUNDLED_ISL=ON ../llvm && make -j30 && make check-polly -j20

(i.e. when not using dylib and not linking polly statically)

and

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/inst -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_LLVM_DYLIB=ON   -DLLVM_POLLY_LINK_INTO_TOOLS=OFF -DLLVM_TOOL_POLLY_BUILD=ON -DPOLLY_BUNDLED_ISL=ON ../llvm && make -j30 && make check-polly -j20

(i.e. when using dylib but without polly linked in statically)

serge-sans-paille added a comment.EditedFeb 12 2020, 2:34 AM

But it fails (registered twice) when using LLVM_ENABLE_PROJECTS instead... That's definitively a lot of configuration :-

Actually a configuration issue on my side, everything works file with that config too.

serge-sans-paille edited the summary of this revision. (Show Details)

Totally different, and much cleaner approach of the issue.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2020, 5:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hans accepted this revision.Feb 13 2020, 12:47 AM

Looks reasonable to me.

This revision is now accepted and ready to land.Feb 13 2020, 12:47 AM
This revision was automatically updated to reflect the committed changes.