Lines Matching +full:llvm +full:- +full:project
2 Creating an LLVM Project
11 The LLVM build system is designed to facilitate the building of third party
12 projects that use LLVM header files, libraries, and tools. In order to use
13 these facilities, a ``Makefile`` from a project must do the following things:
16 to set to use the LLVM build system:
18 * ``PROJECT_NAME`` - The name by which your project is known.
19 * ``LLVM_SRC_ROOT`` - The root of the LLVM source tree.
20 * ``LLVM_OBJ_ROOT`` - The root of the LLVM object tree.
21 * ``PROJ_SRC_ROOT`` - The root of the project's source tree.
22 * ``PROJ_OBJ_ROOT`` - The root of the project's object tree.
23 * ``PROJ_INSTALL_ROOT`` - The root installation directory.
24 * ``LEVEL`` - The relative path from the current directory to the
25 project's root ``($PROJ_OBJ_ROOT)``.
33 * You can write your own ``Makefiles`` which hard-code these values.
35 * You can use the pre-made LLVM sample project. This sample project includes
37 of LLVM, and the ability to support multiple object directories from a single
40 If you want to devise your own build system, studying other projects and LLVM
47 In order to use the LLVM build system, you will want to organize your source
49 your source tree layout to look similar to the LLVM source tree layout.
66 project. By global, we mean that they are used by more than one library or
67 executable of your project.
70 automatically by the LLVM build system. For example, if you have a file
85 Currently, the LLVM build system provides basic support for tests. The LLVM
88 * LLVM contains regression tests in ``llvm/test``. These tests are run by the
93 * LLVM contains an optional package called ``llvm-test``, which provides
96 information, and compare it to the current LLVM performance statistics.
98 Currently, there is no way to hook your tests directly into the ``llvm/test``
105 Writing LLVM Style Makefiles
108 The LLVM build system provides a convenient way to build libraries and
109 executables. Most of your project Makefiles will only need to define a few
114 ------------------
119 directory of your project's source code. For example, if your source code
124 -------------------------------------
143 --------------------------------
163 -------------------------------
184 linked into the program. These libraries must be LLVM libraries. The
191 Note that this works only for statically linked libraries. LLVM is split
194 libraries use: ``llvm-config --libs all``. Using ``LINK_COMPONENTS`` as
199 This variable holds a space separated list of components that the LLVM
200 ``Makefiles`` pass to the ``llvm-config`` tool to generate a link line for
201 the program. For example, to link with all LLVM libraries use
206 To link dynamic libraries, add ``-l<library base name>`` to the ``LIBS``
207 variable. The LLVM build system will look in the same places for dynamic
213 .. code-block:: makefile
215 LIBS += -lsample
221 -----------------------
230 opposed to overwriting them. The LLVM ``Makefiles`` may already have
254 If you have any questions or need any help creating an LLVM project, the LLVM
257 <https://discourse.llvm.org>`_.