[llvm-dev] Building SVN head with CMake - shared libraries?

Ismail Donmez via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 02:35:15 PST 2016


On Fri, Jan 15, 2016 at 12:25 PM, Andrew Wilkins <axwalk at gmail.com> wrote:
>
>
> On Fri, 15 Jan 2016 at 18:19 Ismail Donmez via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>>
>> On Fri, Jan 15, 2016 at 11:08 AM, Ismail Donmez <ismail at i10z.com> wrote:
>> > On Fri, Jan 15, 2016 at 11:05 AM, Ismail Donmez <ismail at i10z.com> wrote:
>> >> Hi,
>> >>
>> >> On Fri, Jan 15, 2016 at 12:59 AM, Chris Bieneman <beanz at apple.com>
>> >> wrote:
>> >>> I’m kinda scared that you’re using it. What are you trying to
>> >>> accomplish
>> >>> that you are using it? Generally having LLVM split among that many
>> >>> dynamically loaded libraries results in significant performance
>> >>> regressions.
>> >>
>> >> When we first switched to cmake it was the only option to produce
>> >> shared libraries, hence we went with it. I am testing with
>> >> -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON atm, and will let
>> >> you know if any problem arises.
>> >
>> > And one immediate "problem" shows up. I ended up with
>> >
>> > libLLVM-3.9svn.so
>> >
>> > and
>> >
>> > libclang.so
>> > libclang.so.3.9
>> >
>> > LLVM's shared lib naming looks wrong.
>
>
> Wrong because they're inconsistent? libLLVM was changed recently
> (major.minor added to library name) to match what autotools builds did.

Indeed and doesn't match usual library naming on Linux either. I
believe there was a cmake variable to configure the resulting shared
library name. I'll look it up.

>> And one more thing, in this setup llvm-config --libs lists static
>> libraries which is a no-go because Linux distros in the 99% of the
>> case want to ship only shared libraries.
>
>
> Same problem with autotools builds. I have a couple of patches that will fix
> this:
>    http://reviews.llvm.org/D15033 (reverted due to bug, fixed by below)
>    http://reviews.llvm.org/D15986

I'll have a look, thanks!


More information about the llvm-dev mailing list