I am trying to create Clang with libC ++ from sources. And I'm trying to remove libC ++ in-tree by creating it outside the tree with other components. The recipe I'm using is below.
If I just put libcxx and libcxxabi in a tree, then configure not so that they are not created automatically. I put them in llvm/projects for LLVM lib ++ Standard Library .
In addition, adding make cxx to the recipe does not work, as shown on the LLVM libC ++ Standard Library page. This leads to:
llvm[0]: Constructing LLVMBuild project information. make: *** No rule to make target `cxx'. Stop.
When I configure LLVM / Clang with --with-libcxx and --with-libcxxabi :
then I get the following:
configure: WARNING: Unknown project (libcxx) won't be configured automatically configure: WARNING: Unknown project (libcxxabi) won't be configured automatically
libcxx and libcxxabi are literally what LLVM calls them, so I'm not sure which names to use if they are incorrect.
I tried to learn configure , for what the package names should be, but this is not very useful. The following is the logic.
How to configure and create Clang with lib ++ (when lib ++ and lib ++ ABI are in the tree)?
The logic configuration for --with-XXX shown below.
thatβs all I can find (its not very useful):
-with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Related links:
And this question is related: When are libC ++ sources needed when creating Clang from sources?
And this is a discussion of the CFE-Dev mailing list: Questions about libC ++ for linux and its git repository (if any) . The thread says unpacking libcxx in llcm/projects ensures that headers are copied, where Clang expects them during make install . But it does not address the --with-XXX question, it does not discuss why libc++ not created, and it does not discuss how to get make install to actually install the libraries.
Recipe for extracting and assembling Clang. It works great, if not , including libcxx and libcxxabi .