[libc] Update cross-compilation instructions
* Add various options so that it uses the build lld and compiler-rt
* Add instructions on how to use the newly built libc
* Remove trailing comments in code-block for cut and pastability
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145878
diff --git a/libc/docs/full_cross_build.rst b/libc/docs/full_cross_build.rst
index 2f95f5b..431edb6 100644
--- a/libc/docs/full_cross_build.rst
+++ b/libc/docs/full_cross_build.rst
@@ -17,7 +17,8 @@
Configure the full cross build of the libc
==========================================
-Below is a simple recipe to configure the libc for a cross build.
+Below is a simple recipe to configure the libc for a cross build. In this,
+we've set Ninja as the generator, and are building the full libc.
.. code-block:: sh
@@ -25,10 +26,11 @@
$> mkdir build
$> cd build
$> cmake ../llvm \
- -G Ninja \ # Generator
- -DLLVM_ENABLE_PROJECTS=libc \ # Enable the libc project
- -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
- -DLLVM_LIBC_FULL_BUILD=ON \ # We are building the full libc
+ -G Ninja \
+ -DLLVM_ENABLE_PROJECTS=libc \
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
+ -DLLVM_LIBC_FULL_BUILD=ON \
-DLIBC_TARGET_TRIPLE=<Your target triple>
We will go over the special options passed to the ``cmake`` command above.