1 llvm-build - LLVM Project Build Utility 2 ======================================= 3 4 5 SYNOPSIS 6 -------- 7 8 9 **llvm-build** [*options*] 10 11 12 DESCRIPTION 13 ----------- 14 15 16 **llvm-build** is a tool for working with LLVM projects that use the LLVMBuild 17 system for describing their components. 18 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 22 information. 23 24 25 OPTIONS 26 ------- 27 28 29 30 **-h**, **--help** 31 32 Print the builtin program help. 33 34 35 36 **--source-root**\ =\ *PATH* 37 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. 41 42 43 44 **--print-tree** 45 46 Print the component tree for the project. 47 48 49 50 **--write-library-table** 51 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. 56 57 58 59 **--write-llvmbuild** 60 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. 66 67 68 69 **--write-cmake-fragment** 70 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. 75 76 77 78 **--write-make-fragment** 79 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. 84 85 86 87 **--llvmbuild-source-root**\ =\ *PATH* 88 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 92 *LLVMBuild* schema. 93 94 95 96 97 EXIT STATUS 98 ----------- 99 100 101 **llvm-build** exits with 0 if operation was successful. Otherwise, it will exist 102 with a non-zero value. 103