Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 1 | llvm-build - LLVM Project Build Utility |
| 2 | ======================================= |
| 3 | |
James Henderson | a056684 | 2019-06-27 13:24:46 +0000 | [diff] [blame] | 4 | .. program:: llvm-build |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 5 | |
| 6 | SYNOPSIS |
| 7 | -------- |
| 8 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 9 | **llvm-build** [*options*] |
| 10 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 14 | **llvm-build** is a tool for working with LLVM projects that use the LLVMBuild |
| 15 | system for describing their components. |
| 16 | |
| 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 |
| 20 | information. |
| 21 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 22 | OPTIONS |
| 23 | ------- |
| 24 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 25 | **-h**, **--help** |
| 26 | |
| 27 | Print the builtin program help. |
| 28 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 29 | **--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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 35 | **--print-tree** |
| 36 | |
| 37 | Print the component tree for the project. |
| 38 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 39 | **--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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 46 | **--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 Kramer | bde9176 | 2012-06-02 10:20:22 +0000 | [diff] [blame] | 51 | source file, although at this time it only preserves block comments that precede |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 52 | the section names in the *LLVMBuild* files. |
| 53 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 54 | **--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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 61 | **--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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 68 | **--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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 75 | EXIT STATUS |
| 76 | ----------- |
| 77 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 78 | **llvm-build** exits with 0 if operation was successful. Otherwise, it will exist |
| 79 | with a non-zero value. |