[libc-commits] [libc] [libc][docs] Update docs to reflect new headergen (PR #102381)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Aug 15 10:17:59 PDT 2024
================
@@ -8,27 +8,97 @@ Full Host Build
:depth: 1
:local:
+.. note::
+ Fullbuild requires running headergen, which is a python program that depends on
+ pyyaml. The minimum versions are listed on the :ref:`header_generation`
+ page, as well as additional information.
+
In this document, we will present a recipe to build the full libc for the host.
When we say *build the libc for the host*, the goal is to build the libc for
-the same system on which the libc is being built. Also, we will take this
-opportunity to demonstrate how one can set up a *sysroot* (see the documentation
+the same system on which the libc is being built. First, we will explain how to
+build for developing LLVM-libc, then we will explain how to build LLVM-libc as
+part of a complete toolchain.
+
+Configure the build for development
+===================================
+
+
+Below is the list of commands for a simple recipe to build LLVM-libc for
+development. In this we've set the Ninja generator, set the build type to
+"Debug", and enabled the Scudo allocator. This build also enables generating the
+documentation and verbose cmake logging, which are useful development features.
+
+.. note::
+ if your build fails with an error saying the compiler can't find
+ ``<asm/unistd.h>`` or similar then you're probably missing the symlink from
+ ``/usr/include/asm`` to ``/usr/include/<HOST TRIPLE>/asm``. Installing the
+ ``gcc-multilib`` package creates this symlink, or you can do it manually with
+ this command:
+ ``sudo ln -s /usr/include/<HOST TRIPLE>/asm /usr/include/asm``
+ (your host triple will probably be similar to ``x86_64-linux-gnu``)
+
+.. code-block:: sh
+
+ $> cd llvm-project # The llvm-project checkout
+ $> mkdir build
+ $> cd build
+ $> cmake ../runtimes \
----------------
michaelrj-google wrote:
That's odd, when I run it on a fresh build folder it works fine. Could you make sure that you didn't have a lingering CMakeCache.txt and try it again?
https://github.com/llvm/llvm-project/pull/102381
More information about the libc-commits
mailing list