1 llvm-build - LLVM Project Build Utility
2 =======================================
4 .. program:: llvm-build
9 **llvm-build** [*options*]
14 **llvm-build** is a tool for working with LLVM projects that use the LLVMBuild
15 system for describing their components.
17 At heart, **llvm-build** is responsible for loading, verifying, and manipulating
18 the project's component data. The tool is primarily designed for use in
19 implementing build systems and tools which need access to the project structure
27 Print the builtin program help.
29 **--source-root**\ =\ *PATH*
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.
37 Print the component tree for the project.
39 **--write-library-table**
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.
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.
54 **--write-cmake-fragment**
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.
61 **--write-make-fragment**
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.
68 **--llvmbuild-source-root**\ =\ *PATH*
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
78 **llvm-build** exits with 0 if operation was successful. Otherwise, it will exist
79 with a non-zero value.