llvm-build.rst 2.5 KB

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