[libcxx-commits] [libcxx] [libc++][doc] Use installed std modules in external projects. (PR #80601)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 9 04:30:41 PST 2024
================
@@ -107,34 +107,40 @@ Users need to be able to build their own BMI files.
Currently this requires a local build of libc++ with modules enabled. Since
modules are not part of the installation yet, they are used from the build
-directory. First libc++ needs to be build with module support enabled.
+directory. First libc++ needs to be build with module support enabled. If
+the libc++ is built with installation of modules enabled, they can also be
+used from the installation directory. The following instructions enable the
+installation of modules and install the modules into ``<install_prefix>``.
.. code-block:: bash
- $ git clone https://github.com/llvm/llvm-project.git
+ $ git clone https://github.com/llvm/llvm-project.git --depth 1
$ cd llvm-project
$ mkdir build
- $ cmake -G Ninja -S runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
- $ ninja -C build
+ $ cmake -G Ninja -S runtimes -B build -DLIBCXX_INSTALL_MODULES=ON -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
+ $ cmake --build build -- -j $(nproc)
+ $ cmake --install build --prefix <install_prefix>
----------------
mordante wrote:
I really prefer to keep the `ninja -C build` and add `ninja install -C build`. This is the style we use in other parts of the libc++ documentation.
https://github.com/llvm/llvm-project/pull/80601
More information about the libcxx-commits
mailing list