[PATCH] D61909: Add Clang shared library with C++ exports

Chris Bieneman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 15:11:12 PDT 2019


beanz added a comment.

In D61909#1503642 <https://reviews.llvm.org/D61909#1503642>, @winksaville wrote:

> Sorry, maybe I didn't make myself clear.


I understood you fine. I don't think you understand the guidance for building distributions of LLVM.

Distributions only get libclang_shared if they run the `install` target which installs all of LLVM & Clang. The point of `LLVM_DISTRIBUTION_COMPONENTS` is to allow people constructing distributions to choose which pieces they want to install without introducing a whole lot of overhead in the build system. The old method of passing dozens of flags to enable and disable individual pieces of the build resulted in a combinatoric explosion in build settings which are confusing and ill understood. The new method is one setting that is much cleaner to use.

Anyone constructing a distribution should be specifying `LLVM_DISTRIBUTION_COMPONENTS` and running the `install-distribution` target.

Given that your comment:

> What I meant was that this change currently uses `if(UNIX)` to generate `libclang_shared.so`, which means "all linux distors" will have both `libclang*.a` and `libclang_shared.so`.

Is only true if the distribution is choosing to run the `install` target, which doesn't grant control over all the individual pieces of LLVM & Clang to install, and is not the recommended way to construct a distribution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61909/new/

https://reviews.llvm.org/D61909





More information about the cfe-commits mailing list