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

Wink Saville via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 23:10:48 PDT 2019


winksaville added a comment.

> 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.

Is there any documentation for LLVM_DISTRIBUTION_COMPONENTS? I searched llvm-project and didn't find any.
The only thing I found on the internet was this LLVM weekly post <http://llvmweekly.org/issue/123>, which pointed me to your llvm-dev post <http://lists.llvm.org/pipermail/llvm-dev/2016-May/098993.html> which says look at Apple-stage2.cmake.
I looked at it and there are a bunch of `set` commands and the one occurrance of `set(LLVM_DISTRIBUTION_COMPONENTS` with a list of components. So I thought I'd try the simplest thing possible, pass `-DLLVM_DISTRIBUTION_COMPONENTS` to cmake:

  $ cmake ../llvm -G Ninja -DLLVM_DISTRIBUTION_COMPONENTS=clang

And it failed with:

  CMake Error at CMakeLists.txt:1108 (message):
    Specified distribution component 'clang' doesn't have a target
  
  
  CMake Error at CMakeLists.txt:1114 (message):
    Specified distribution component 'clang' doesn't have an install target
  
  
  CMake Error at CMakeLists.txt:1120 (message):
    Specified distribution component 'clang' doesn't have an install-stripped
    target.  Its installation target creation should be changed to use
    add_llvm_install_targets, or you should manually create the
    'install-clang-stripped' target.

So obviously, that was wrong.


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