LLVM-BUILD(1)

πŸ“¦
version 11.1.0 Β· 2 versions
, in fedora 43, fedora 44

πŸ’… llvm-build β€” the LLVM Project Build Utility, but make it a group chat

okay so bestie, welcome to LLVM-BUILD(1), the section 1 manual for the LLVM Project's very own build utility πŸ’–. It lives in the LLVM manual, and honestly? She's a baddie. Let's get into it.


✨ NAME ✨

llvm-build β€” the LLVM Project Build Utility. That's her. That's the whole name. Iconic, no notes. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

llvm-build [options]

that's it. that's the whole vibe. options only, no positional args, she doesn't need them. πŸ’…


🌸 DESCRIPTION 🌸

So llvm-build is the tool for working with LLVM projects that use the LLVMBuild system to describe their components. If your project speaks LLVMBuild, she's your girl. 🫢

At her core β€” like, her whole heart, her main character energy β€” llvm-build is responsible for loading, verifying, and manipulating the project's component data. Literally that's her job. That's the assignment and she ate. πŸ”₯

And why does she exist? She's primarily designed for use in implementing build systems and tools which need access to the project structure information. So she's not really out here for casual vibes β€” she's the behind-the-scenes bestie making your build system work. iykyk. ✨


πŸŽ€ OPTIONS πŸŽ€

okay here's the menu, and bestie we are going through every single one. no skips, no skimming, periodt.

  • -h, --help β€” print the builtin program help. your classic "wait what does this do again" button πŸ™ˆ
  • --source-root=PATH β€” if you give her this, she'll load the project at the given source root PATH. If you don't give it? She infers where the project sources live from the location of the llvm-build script itself. she's smart like that. 🧚
  • --print-tree β€” print the component tree for the project. look at the whole family tree, bestie 🌈
  • --write-library-table β€” write out the C++ fragment which defines the components, library names, and required libraries. This C++ fragment is built into llvm-config|llvm-config in order to provide clients with the list of required libraries for arbitrary component combinations. yes it's giving compiler internals, slay πŸ’…
  • --write-llvmbuild β€” write out new LLVMBuild.txt files based on the loaded components. Super useful for auto-upgrading the schema of the files. Now listen: llvm-build will try, to a limited extent, to preserve the comments that were written in the original source file β€” although at this time it only preserves block comments that precede the section names in the LLVMBuild files. so don't come for her about your inline comments, she's doing her best 😭
  • --write-cmake-fragment β€” write out the LLVMBuild in the form of a CMake fragment, so it can easily be consumed by the CMake based build system. Heads up tho: the exact contents and format of this file are closely tied to how LLVMBuild is integrated with CMake β€” see LLVM's top-level CMakeLists.txt. so if you mess with one, you mess with the other. they're bonded fr fr 🫢
  • --write-make-fragment β€” write out the LLVMBuild in the form of a Makefile fragment, so it can easily be consumed by a Make based build system. Same energy as above: the exact contents and format of this file are closely tied to how LLVMBuild is integrated with the Makefiles β€” see LLVM's Makefile.rules. πŸ‘‘
  • --llvmbuild-source-root=PATH β€” if given, expect the LLVMBuild files for the project to be rooted at the given path, instead of inside the source tree itself. This option is primarily designed for use in conjunction with --write-llvmbuild to test changes to LLVMBuild schema. it's the testing-bestie of --write-llvmbuild, they come as a pair πŸ’–

⭐ EXIT STATUS ⭐

llvm-build exits with 0 if the operation was successful. Otherwise, it will exit with a non-zero value. (yes, the original says "exist" instead of "exit" β€” she's a little typo-coded, we still love her πŸ’€)

So like: 0 = we ate. non-zero = something went wrong, check yourself. 😭


🫢 AUTHOR 🫢

Maintained by the LLVM Team (https://llvm.org/). they're the parents. they keep her fed. πŸ’œ


2003-2024, LLVM Project


and that's the whole page bestie!! 🌈✨

one last thing β€” this is LLVM-BUILD(1) from the LLVM manual, version 11, dated 2024-07-18. go forth and build, my love. periodt πŸ’…πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from