1 llvm-build - LLVM Project Build Utility
2 =======================================
9 **llvm-build** [*options*]
16 **llvm-build** is a tool for working with LLVM projects that use the LLVMBuild
17 system for describing their components.
19 At heart, **llvm-build** is responsible for loading, verifying, and manipulating
20 the project's component data. The tool is primarily designed for use in
21 implementing build systems and tools which need access to the project structure
32 Print the builtin program help.
36 **--source-root**\ =\ *PATH*
38 If given, load the project at the given source root path. If this option is not
39 given, the location of the project sources will be inferred from the location of
40 the **llvm-build** script itself.
46 Print the component tree for the project.
50 **--write-library-table**
52 Write out the C++ fragment which defines the components, library names, and
53 required libraries. This C++ fragment is built into llvm-config|llvm-config
54 in order to provide clients with the list of required libraries for arbitrary
55 component combinations.
61 Write out new *LLVMBuild.txt* files based on the loaded components. This is
62 useful for auto-upgrading the schema of the files. **llvm-build** will try to a
63 limited extent to preserve the comments which were written in the original
64 source file, although at this time it only preserves block comments that precede
65 the section names in the *LLVMBuild* files.
69 **--write-cmake-fragment**
71 Write out the LLVMBuild in the form of a CMake fragment, so it can easily be
72 consumed by the CMake based build system. The exact contents and format of this
73 file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's
74 top-level CMakeLists.txt.
78 **--write-make-fragment**
80 Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be
81 consumed by a Make based build system. The exact contents and format of this
82 file are closely tied to how LLVMBuild is integrated with the Makefiles, see
83 LLVM's Makefile.rules.
87 **--llvmbuild-source-root**\ =\ *PATH*
89 If given, expect the *LLVMBuild* files for the project to be rooted at the
90 given path, instead of inside the source tree itself. This option is primarily
91 designed for use in conjunction with **--write-llvmbuild** to test changes to
101 **llvm-build** exits with 0 if operation was successful. Otherwise, it will exist
102 with a non-zero value.