1llvm-build - LLVM Project Build Utility
2=======================================
3
4.. program:: llvm-build
5
6SYNOPSIS
7--------
8
9**llvm-build** [*options*]
10
11DESCRIPTION
12-----------
13
14**llvm-build** is a tool for working with LLVM projects that use the LLVMBuild
15system for describing their components.
16
17At heart, **llvm-build** is responsible for loading, verifying, and manipulating
18the project's component data. The tool is primarily designed for use in
19implementing build systems and tools which need access to the project structure
20information.
21
22OPTIONS
23-------
24
25**-h**, **--help**
26
27 Print the builtin program help.
28
29**--source-root**\ =\ *PATH*
30
31 If given, load the project at the given source root path. If this option is not
32 given, the location of the project sources will be inferred from the location of
33 the **llvm-build** script itself.
34
35**--print-tree**
36
37 Print the component tree for the project.
38
39**--write-library-table**
40
41 Write out the C++ fragment which defines the components, library names, and
42 required libraries. This C++ fragment is built into llvm-config|llvm-config
43 in order to provide clients with the list of required libraries for arbitrary
44 component combinations.
45
46**--write-llvmbuild**
47
48 Write out new *LLVMBuild.txt* files based on the loaded components. This is
49 useful for auto-upgrading the schema of the files. **llvm-build** will try to a
50 limited extent to preserve the comments which were written in the original
51 source file, although at this time it only preserves block comments that precede
52 the section names in the *LLVMBuild* files.
53
54**--write-cmake-fragment**
55
56 Write out the LLVMBuild in the form of a CMake fragment, so it can easily be
57 consumed by the CMake based build system. The exact contents and format of this
58 file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's
59 top-level CMakeLists.txt.
60
61**--write-make-fragment**
62
63 Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be
64 consumed by a Make based build system. The exact contents and format of this
65 file are closely tied to how LLVMBuild is integrated with the Makefiles, see
66 LLVM's Makefile.rules.
67
68**--llvmbuild-source-root**\ =\ *PATH*
69
70 If given, expect the *LLVMBuild* files for the project to be rooted at the
71 given path, instead of inside the source tree itself. This option is primarily
72 designed for use in conjunction with **--write-llvmbuild** to test changes to
73 *LLVMBuild* schema.
74
75EXIT STATUS
76-----------
77
78**llvm-build** exits with 0 if operation was successful. Otherwise, it will exist
79with a non-zero value.
80