[llvm-dev] Problem with the way BUILD_SHARED_LIBS=ON handled in llvm 3.8

Ismail Donmez via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 27 00:18:00 PST 2016


Hi,

On Tue, Jan 26, 2016 at 6:57 PM, ChrisBieneman <beanz at apple.com> wrote:
> Yes, I'm aware of the change that caused this. It was when I stopped setting SOVERSION as a target property on all shared libraries. That change was deliberate in order to match functionality between CMake and the autoconf build.
>
> In the autoconf build we didn't actually set the SOVERSION on libraries. Instead we include the version in the name of libLLVM, and we didn't version libLTO (except on Darwin).
>
> I believe we are coming back to the point that BUILD_SHARED_LIBS=On should never be used when building a distribution, so the libraries shouldn't be versioned. The only reason to use libLTO is if your system linker is slow and you want to improve iteration times.
>
> A clang built with BUILD_SHARED_LIBS=On will be significantly slower than one built against a single LLVM dynamic library, and in turn that is significantly slower than a clang built against static libraries. On Darwin process launch for a clang built against an LLVM dynamic library takes 2ms longer to launch than clang built against static libraries.
>
> The fix here is not to make BUILD_SHARED_LIBS work the way it used to. The fix is to make LLVM_LINK_LLVM_DYLIB work with out-of-tree builds.

Since I am the only one complained about this so far, I'll revert this
change locally for 3.8 packaging and work on getting
LLVM_LINK_LLVM_DYLIB work as expected so we can use it for packaging
3.9.

Thanks,
ismail


More information about the llvm-dev mailing list