[PATCH] D25008: [cmake] Split linked libraries into private & public, for linker script

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 06:10:58 PDT 2016


mgorny added a comment.

I think it'd be technically possible to force a specific SONAME in the linker script but I don't think that's a good idea. Clang should be able to use any libunwind implementation, and libc++ shouldn't really be encoding internal implementation details to the point of specific SONAME.

On the other hand, if we are doing a complete in-tree build of LLVM with libunwind, I guess it'd be reasonable to avoid combining the system library with the just-built library. Assuming we want to force 'our' library, and considering the fact that the tests are specifying all dependencies explicitly anyway, I think the most correct solution for that would be to skip the linker script for tests.

I see two possible solutions for that: either we pass full SONAME of the library when linking tests, or we provide an additional symlink to skip linker script. Gentoo already does the latter, and I wanted to add support for that into libcxx anyway, so that may be the solution. The idea is that besides `libc++.so` (the linker script), additional `libc++_shared.so` symlink is installed that references the library directly.


Repository:
  rL LLVM

https://reviews.llvm.org/D25008





More information about the cfe-commits mailing list