DescriptionWe've had requests from packagers in the Unladen Swallow merge PEP that we link shared against an LLVM instead of statically. This patch builds a libLLVM2.7svn.(so|dylib) and adds an --enable-shared configure flag to have the tools linked shared. (2.7svn is just $(LLVMVersion) so it'll change to "2.7" in the release.)
On my mac laptop, libLLVM2.7svn.dylib is 39MB, and opt (for example) is 15M static vs 440K shared.
I know of two things that are less than ideal here:
1) The library doesn't include any version information. Since we expect to break the ABI with every release, I don't expect this to be much of a problem. If we do release a compatible 2.7.1, we may be able to hack its library to work with binaries compiled against 2.7.0, or we can just ask them to recompile. I'm hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared library. I'd like to add this as a subsequent patch.
Fixes http://llvm.org/PR3201.
Patch Set 1 #
Total comments: 3
Patch Set 2 : check-lit passes, except unittests don't load #Patch Set 3 : All of check-lit passes #Patch Set 4 : Some linux fixes. Still need more rpaths. #Patch Set 5 : Now with more rpath. check-lit passes on linux #Patch Set 6 : Include the version in the library name. Tweak linux link opts. #Patch Set 7 : Sync in separable changes #Patch Set 8 : Drop shared library dependency on llvm-config #Patch Set 9 : Fix LD_LIBRARY_PATH for linux #Patch Set 10 : Fix breakage on darwin8 and arm #
Total comments: 14
Patch Set 11 : Try to fix build on arm and darwin8, and fix nlewycky's comments #
Total comments: 1
Patch Set 12 : Make --enable-shared control building the shared library at all #
MessagesTotal messages: 12
|