Lines Matching +full:ninja +full:- +full:build
24 overlay mode. In both the ways, we build a static archive named
31 Building LLVM-libc as a standalone runtime
32 ------------------------------------------
37 .. code-block:: sh
39 $> cd llvm-project # The llvm-project checkout
40 $> mkdir build
41 $> cd build
42 $> cmake ../runtimes -G Ninja -DLLVM_ENABLE_RUNTIMES="libc" \
43 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
44 -DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
45 -DCMAKE_INSTALL_PREFIX=<Your prefix of choice> # Optional
47 Next, build the libc:
49 .. code-block:: sh
51 $> ninja libc
55 .. code-block:: sh
57 $> ninja check-libc
59 The build step will build the static archive the in the directory
60 ``build/projects/libc/lib``. Notice that the above CMake configure step also
64 .. code-block:: sh
66 $> ninja install-libc
68 Building the static archive as part of the bootstrap build
69 ----------------------------------------------------------
71 The bootstrap build is a build mode in which runtime components like libc++,
72 libcxx-abi, libc etc. are built using the ToT clang. The idea is that this build
73 produces an in-sync toolchain of compiler + runtime libraries. This ensures that
74 LLVM-libc has access to the latest clang features, which should provide the best
77 .. code-block:: sh
79 $> cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang" \
80 -DLLVM_ENABLE_RUNTIMES="libc" \ # libc is listed as runtime and not as a project
81 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
82 -DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
83 -DCMAKE_INSTALL_PREFIX=<Your prefix of choice> # Optional
85 The build and install steps are the same as above, but the build step will take
88 .. code-block:: sh
90 $> ninja libc
91 $> ninja check-libc
101 .. code-block:: sh
104 -L <path to the directory in which libllvmlibc.a is installed> \ # Optional
105 -lllvmlibc
109 static archive using the ``-L`` option is not necessary.
112 -------------------------------------------------
118 if you want to link ``libllvmlibc.a`` to ``llvm-objcopy``, all you have to do
121 .. code-block:: cmake
123 target_link_libraries(llvm-objcopy PRIVATE llvmlibc)