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