[PATCH] D90025: add LLVM_INCLUDE_LIB CMake option

Ivan Le Lann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:21:14 PDT 2020


ilelann added a comment.

In D90025#2350101 <https://reviews.llvm.org/D90025#2350101>, @ldionne wrote:

> Oh, I looked a bit fast. I think I understand the intent here -- you're trying to make it easier to build libcxx as part of the monorepo without the rest of LLVM?

That is the intent indeed.
Starting from the "official" build instructions found here https://libcxx.llvm.org/docs/BuildingLibcxx.html, I ultimately got this CMake incantation to get a minimal libunwind+libcxxabi+libcxx static build:
https://github.com/ilelann/IncludeOS/blob/master/CMakeLists.txt#L77-L130

And I am totally happy with it, despite the arguably long list of flags.
The additionnal LLVM_INCLUDE_LIB proposed here is only to avoid configuring and building a large set of irrelevant targets.
With my patch and LLVM_INCLUDE_LIB set to OFF, the "pollution" brought by including the main LLVM CMake file is really minimal: when I "make" my super-project I don't notice any irrelevant target.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90025



More information about the llvm-commits mailing list