llvm-build.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. llvm-build - LLVM Project Build Utility
  2. =======================================
  3. .. program:: llvm-build
  4. SYNOPSIS
  5. --------
  6. **llvm-build** [*options*]
  7. DESCRIPTION
  8. -----------
  9. **llvm-build** is a tool for working with LLVM projects that use the LLVMBuild
  10. system for describing their components.
  11. At heart, **llvm-build** is responsible for loading, verifying, and manipulating
  12. the project's component data. The tool is primarily designed for use in
  13. implementing build systems and tools which need access to the project structure
  14. information.
  15. OPTIONS
  16. -------
  17. **-h**, **--help**
  18. Print the builtin program help.
  19. **--source-root**\ =\ *PATH*
  20. If given, load the project at the given source root path. If this option is not
  21. given, the location of the project sources will be inferred from the location of
  22. the **llvm-build** script itself.
  23. **--print-tree**
  24. Print the component tree for the project.
  25. **--write-library-table**
  26. Write out the C++ fragment which defines the components, library names, and
  27. required libraries. This C++ fragment is built into llvm-config|llvm-config
  28. in order to provide clients with the list of required libraries for arbitrary
  29. component combinations.
  30. **--write-llvmbuild**
  31. Write out new *LLVMBuild.txt* files based on the loaded components. This is
  32. useful for auto-upgrading the schema of the files. **llvm-build** will try to a
  33. limited extent to preserve the comments which were written in the original
  34. source file, although at this time it only preserves block comments that precede
  35. the section names in the *LLVMBuild* files.
  36. **--write-cmake-fragment**
  37. Write out the LLVMBuild in the form of a CMake fragment, so it can easily be
  38. consumed by the CMake based build system. The exact contents and format of this
  39. file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's
  40. top-level CMakeLists.txt.
  41. **--write-make-fragment**
  42. Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be
  43. consumed by a Make based build system. The exact contents and format of this
  44. file are closely tied to how LLVMBuild is integrated with the Makefiles, see
  45. LLVM's Makefile.rules.
  46. **--llvmbuild-source-root**\ =\ *PATH*
  47. If given, expect the *LLVMBuild* files for the project to be rooted at the
  48. given path, instead of inside the source tree itself. This option is primarily
  49. designed for use in conjunction with **--write-llvmbuild** to test changes to
  50. *LLVMBuild* schema.
  51. EXIT STATUS
  52. -----------
  53. **llvm-build** exits with 0 if operation was successful. Otherwise, it will exist
  54. with a non-zero value.