blob: 1abf8fbd0463a34ef69acdfebcfe6448e16daccf [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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +00009**llvm-build** [*options*]
10
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000011DESCRIPTION
12-----------
13
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000014**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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000022OPTIONS
23-------
24
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000025**-h**, **--help**
26
27 Print the builtin program help.
28
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000029**--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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000035**--print-tree**
36
37 Print the component tree for the project.
38
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000039**--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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000046**--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
Benjamin Kramerbde91762012-06-02 10:20:22 +000051 source file, although at this time it only preserves block comments that precede
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000052 the section names in the *LLVMBuild* files.
53
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000054**--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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000061**--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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000068**--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
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000075EXIT STATUS
76-----------
77
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000078**llvm-build** exits with 0 if operation was successful. Otherwise, it will exist
79with a non-zero value.