@@ -35,6 +35,14 @@ we've set the Ninja generator, enabled a full compiler suite, set the build
35
35
type to "Debug", and enabled the Scudo allocator. The build also tells clang
36
36
to use the freshly built lld and compiler-rt.
37
37
38
+ .. note ::
39
+ if your build fails with an error saying the compiler can't find
40
+ ``<asm/unistd.h> `` or similar then you're probably missing the symlink from
41
+ ``/usr/include/asm `` to ``/usr/include/<TARGET TRIPLE>/asm ``. Installing the
42
+ ``gcc-multilib `` package creates this symlink, or you can do it manually with
43
+ this command:
44
+ ``sudo ln -s /usr/include/<TARGET TRIPLE>/asm /usr/include/asm ``
45
+
38
46
.. code-block :: sh
39
47
40
48
$> cd llvm-project # The llvm-project checkout
@@ -76,6 +84,14 @@ above.
76
84
Build and install
77
85
=================
78
86
87
+ .. TODO: add this warning to the cmake
88
+ .. warning ::
89
+ Running these install commands without setting a ``$SYSROOT `` will install
90
+ them into your system include path, which may break your system. If you're
91
+ just trying to develop libc, then just run ``ninja check-libc `` to build the
92
+ libc and run the tests. If you've already accidentally installed the headers,
93
+ you may need to delete them from ``/usr/local/include ``.
94
+
79
95
After configuring the build with the above ``cmake `` command, one can build and
80
96
install the libc, clang (and its support libraries and builtins), lld and
81
97
compiler-rt, with the following command:
0 commit comments