60.1. llvm-23.1.2
Compiler infrastructure libraries and tools from the LLVM project
| Version | 23.1.2, release 1 |
| Shelf | toolchain — The native compilers, the linker, the C library, and the LLVM family |
| Phase | 31_compilers (Compilers), 1 of 22 in build order |
| Licence | Apache-2.0 WITH LLVM-exception |
| Homepage | https://llvm.org/ |
| Build time | 108.2 SBU |
| Installed size | 274.5 MiB in 2997 files |
| Recipe | ports/core/toolchain/llvm/kpkgbuild |
About
LLVM: the code generator libraries and their tools (llc, opt, lli, llvm-ar, llvm-objdump, llvm-config and the rest) of the tree’s current LLVM series. Much of 31_compilers is built on it: clang, lld, compiler-rt, openmp and libunwind configure against its installed CMake package, and rust links it instead of the LLVM in its own source. Later phases use it for mesa’s shader compilers, the BPF tools (bpftrace, bcc, bpftool), qemu, wine, spirv-llvm-translator and libclc.
The port carries upstream’s whole llvm-project source archive and configures its llvm directory alone; each other LLVM port carries the same archive and configures its own directory (see A second version beside the first). It is built as one shared library per component, libLLVMCore.so, libLLVMX86CodeGen.so and so on, and there is no libLLVM.so.
Why it is in KDOS
The comment above clang and llvm in script/phases/31_compilers/packages.txt:
clang and llvm are developer tools, not needed for self-hosting: they serve the projects that prefer LLVM. lldb is its own port, in 41_system.
Sources
llvm-23.1.2.tar.xz(170.9 MiB)
sha256c98bbef08a2b4c2613cd50e9aa9ae7b69b1fe6c16b2c40373bc0ab6116fdf78a
upstream: https://github.com/llvm/llvm-project/releases/download/llvmorg-23.1.2/llvm-project-23.1.2.src.tar.xz
archive copy: sources-4/toolchain--clang-23.1.2.tar.xz
Dependencies
Depends on: cmake, ninja, libffi, python3, libxml2, zstd, zlib, binutils, python3-sphinx.
Required by (26): bcc, bpftool, bpftrace, castxml, clang, compiler-rt, firefox-esr, ispc, kdevelop, libclc, librewolf, libunwind, limine, lld, lldb, mesa, mesa-opencl, openmp, perf, python3-pyside6, qemu, qt-creator, rust, spirv-llvm-translator, thunderbird, wine.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/31_compilers/phase.env && kpkg install llvm'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/toolchain/llvm.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/toolchain/llvm
echo 'c98bbef08a2b4c2613cd50e9aa9ae7b69b1fe6c16b2c40373bc0ab6116fdf78a llvm-23.1.2.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/llvm
SRC=$SRC_ROOT/llvm-23.1.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf llvm-23.1.2.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
cmake -S llvm -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D LLVM_HOST_TRIPLE="$(cc -dumpmachine)" \
-D LLVM_DEFAULT_TARGET_TRIPLE="$(cc -dumpmachine)" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -include cstdint -DNDEBUG" \
-D LLVM_BINUTILS_INCDIR=/usr/include \
-D LLVM_BUILD_LLVM_DYLIB=OFF \
-D LLVM_LINK_LLVM_DYLIB=OFF \
-D BUILD_SHARED_LIBS=ON \
-D LLVM_PARALLEL_COMPILE_JOBS="$(echo "$MAKEFLAGS" | grep -o '[0-9]*')" \
-D LLVM_INCLUDE_EXAMPLES=OFF \
-D LLVM_INCLUDE_TESTS=OFF \
-D LLVM_ENABLE_FFI=ON \
-D LLVM_ENABLE_RTTI=ON \
-D LLVM_ENABLE_ZLIB=FORCE_ON \
-D LLVM_ENABLE_ZSTD=FORCE_ON \
-D LLVM_ENABLE_LIBXML2=FORCE_ON \
-D LLVM_ENABLE_LIBEDIT=OFF \
-D LLVM_ENABLE_LIBPFM=OFF \
-D LLVM_ENABLE_Z3_SOLVER=OFF \
-D LLVM_ENABLE_BINDINGS=OFF \
-D LLVM_USE_PERF=ON \
-D LLVM_ENABLE_OCAMLDOC=OFF \
-D LLVM_INSTALL_UTILS=ON \
-D LLVM_UTILS_INSTALL_DIR=lib/llvm/utils \
-D LLVM_TOOL_LLVM_IR2VEC_BUILD=OFF \
-D LLVM_ENABLE_LIBCXX=OFF \
-D LLVM_ENABLE_LLD=OFF \
-D LLVM_OPTIMIZED_TABLEGEN=ON \
-D LLVM_INCLUDE_BENCHMARKS=OFF \
-D LLVM_TARGETS_TO_BUILD=all \
-D LLVM_ENABLE_SPHINX=ON \
-D SPHINX_OUTPUT_HTML=OFF \
-D SPHINX_OUTPUT_MAN=ON \
-D SPHINX_WARNINGS_AS_ERRORS=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
cmake --build build --target docs-llvm-man
install -Dm644 build/docs/man/*.1 -t "$PKG/usr/share/man/man1"
rm -f "$PKG/usr/share/man/man1/llvm-ir2vec.1"
The switches, and why each is set:
LLVM_HOST_TRIPLE— The triple LLVM is built for, set to gcc’s own,$(cc -dumpmachine). Left to itself, LLVM guessesx86_64-unknown-linux-gnuon this system; see the next switch.LLVM_DEFAULT_TARGET_TRIPLE— The target clang and libclang compile for when none is given, also gcc’s triple. Under LLVM’s guess, clang looks for a gcc installation under the glibc triple, finds none beside gcc’sx86_64-pc-linux-musl, searches no C++ header directory and would link against glibc’s loader; every C++ compile through clang or bindgen then fails on'cstddef' file not found. clang and libclang compile the default in from LLVM’sllvm-config.h, so a change here needs clang rebuilt too; see An LLVM that guessed its triple.CMAKE_C_FLAGS_RELEASE— Replaces CMake’s Release flags,-O3 -DNDEBUG, with the tree’sCFLAGSand-DNDEBUG: LLVM compiles at the tree’s level with its assertions off.CMAKE_CXX_FLAGS_RELEASE— The same for C++, with-include cstdintadded, which includes<cstdint>at the top of every C++ file. GCC’s C++ library headers do not bring it in on the way to their own, so a file that usesuint64_tand the other fixed-width types without including the header fails to compile; see A standard header the source never includes.LLVM_BINUTILS_INCDIR=/usr/include— Where binutils’plugin-api.his. With it LLVM builds/usr/lib/LLVMgold.so, LLVM’s link-time optimisation plugin for the plugin interface of binutils’ linkers, whicharandnmcan also load with--pluginto read LLVM bitcode objects. It is not in/usr/lib/bfd-plugins, so none of them loads it unasked. Without the switch the plugin is skipped without a message; with it, the compile needs the header, which is why binutils is independs.LLVM_BUILD_LLVM_DYLIB=OFF— Builds nolibLLVM.so, the single library holding every component.LLVM_LINK_LLVM_DYLIB=OFF— Links the tools against the component libraries, since there is nolibLLVM.soto link.BUILD_SHARED_LIBS=ON— Builds each component as its own shared library. A consumer links the components it names;bccandbpftracecarry switches for this layout, described in the ports catalogue.LLVM_PARALLEL_COMPILE_JOBS— The number of compile jobs Ninja runs at once, taken from the-jNinMAKEFLAGS, which is the build’s job count,KDOS_JOBS.script/env/common.envkeepsMAKEFLAGSexactly-jNbecause this recipe reads the number out of it.LLVM_INCLUDE_EXAMPLES=OFF— Generates no targets for the examples; withLLVM_INCLUDE_TESTS=OFFandLLVM_INCLUDE_BENCHMARKS=OFF, the build has no test suite and no benchmarks.LLVM_ENABLE_FFI=ON— Links the interpreter,lli, with libffi, so interpreted code can call functions in native libraries.LLVM_ENABLE_RTTI=ON— Builds LLVM with C++ run-time type information. Upstream’s default is off; a program compiled with RTTI that derives from an LLVM class needs LLVM’s type information to link.LLVM_ENABLE_ZLIB=FORCE_ON— zlib compression in the tools (compressed debug sections, among others).FORCE_ONmakes a missing zlib a configure error instead of a build without it.LLVM_ENABLE_ZSTD=FORCE_ON— The same for zstd.LLVM_ENABLE_LIBXML2=FORCE_ON— The same for libxml2, which LLVM’s Windows manifest library uses (llvm-mt, and the COFF linker of lld through it).LLVM_ENABLE_LIBEDIT=OFF— No line editing in LLVM’s interactive tools. libedit is built in41_system, a later phase, so the automatic probe would makeclang-repl’s line editing, and theHAVE_LIBEDITthat LLVM’s CMake package exports, depend on build order.LLVM_ENABLE_LIBPFM=OFF— No hardware performance counters through libpfm, which the tree does not carry.LLVM_ENABLE_Z3_SOLVER=OFF— No Z3 constraint solver for clang’s static analyzer. z3 is a41_systemport, so a tree rebuilt after that phase has it; naming the switch keeps LLVM’s configuration the same either way.LLVM_ENABLE_BINDINGS=OFF— Builds no OCaml bindings. They are built when an OCaml with itsctypespackage is found, and ocaml is a40_langport.LLVM_ENABLE_OCAMLDOC=OFF— No documentation for those bindings.LLVM_USE_PERF=ON— Builds LLVM’s perf JIT event listener, which writes thejit-<pid>.dumpfiles perf reads to name JIT-compiled code in a profile.LLVM_INSTALL_UTILS=ON— Installs LLVM’s test utilities,FileCheck,not,count,split-file,yaml2objand the rest, and exports them in LLVM’s CMake package; off, they are built for the build tree alone and neither installed nor exported. rust’s bootstrap refuses an external LLVM that has noFileCheck, and its recipe names/usr/lib/llvm/utils/FileCheck.LLVM_UTILS_INSTALL_DIR=lib/llvm/utils— Installs those utilities in/usr/lib/llvm/utilsinstead of/usr/bin, where generic names such asnotandcountcould collide with another port’s. A consumer that runs one names its path.LLVM_TOOL_LLVM_IR2VEC_BUILD=OFF— Leaves outllvm-ir2vec. It links two helper libraries declaredBUILDTREE_ONLY, whichBUILD_SHARED_LIBSturns into shared objects that are never installed, so the installed binary could not start.LLVM_ENABLE_LIBCXX=OFF— Builds against GCC’s libstdc++, the C++ library of the whole tree, not LLVM’s libc++, which the tree does not carry.LLVM_ENABLE_LLD=OFF— Links with the default linker, binutils’ld. lld is built from this port’s libraries, later in the phase.LLVM_OPTIMIZED_TABLEGEN=ON— In a debug or assertion build, builds an optimised copy of TableGen to run during the build. In this Release build without assertions TableGen is already optimised, so the switch changes nothing.LLVM_TARGETS_TO_BUILD=all— Builds every code generator LLVM has, not only x86: clang, Rust and the other consumers can compile for any of them, and Mesa needs the AMDGPU one.LLVM_ENABLE_SPHINX=ON— Makes the Sphinx documentation targets available, which python3-sphinx independsbuilds.SPHINX_OUTPUT_HTML=OFF— No HTML documentation targets.SPHINX_OUTPUT_MAN=ON— The manual-page target,docs-llvm-man, built by name after the install.SPHINX_WARNINGS_AS_ERRORS=OFF— Upstream’s default turns every Sphinx warning into an error, and the release’s own documents draw warnings, so the manual pages would not build.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/llvm, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf llvm-23.1.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/llvm, and runs the triggers its paths call for.
Contents
Installed programs: clang-offload-packager, dsymutil, llc, lli, llubi, llvm-addr2line, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-bitcode-strip, llvm-c-test, llvm-cas, llvm-cat, llvm-cfi-verify, llvm-cgdata, llvm-config, llvm-cov, llvm-ctxprof-util, llvm-cvtres, llvm-cxxdump, llvm-cxxfilt, llvm-cxxmap, llvm-debuginfo-analyzer, llvm-debuginfod, llvm-debuginfod-find, llvm-diff, llvm-dis, llvm-dlltool, llvm-dwarfdump, llvm-dwarfutil, llvm-dwp, llvm-exegesis, llvm-extract, llvm-extract-bundle-entry, llvm-gpu-loader, llvm-gsymutil, llvm-ifs, llvm-install-name-tool, llvm-jitlink, llvm-lib, llvm-libtool-darwin, llvm-link, llvm-lipo, llvm-lto, llvm-lto2, llvm-mc, llvm-mca, llvm-ml, llvm-ml64, llvm-modextract, llvm-mt, llvm-nm, llvm-objcopy, llvm-objdump, llvm-offload-binary, llvm-offload-wrapper, llvm-opt-report, llvm-otool, llvm-pdbutil, llvm-profdata, llvm-profgen, llvm-ranlib, llvm-rc, llvm-readelf, llvm-readobj, llvm-readtapi, llvm-reduce, llvm-remarkutil, llvm-rtdyld, llvm-sim, llvm-size, llvm-split, llvm-stress, llvm-strings, llvm-strip, llvm-symbolizer, llvm-tblgen, llvm-tli-checker, llvm-undname, llvm-windres, llvm-xray, opt, reduce-chunk-list, sancov, sanstats, verify-uselistorder.
Installed libraries: libLLVMAArch64AsmParser.so, libLLVMAArch64CodeGen.so, libLLVMAArch64Desc.so, libLLVMAArch64Disassembler.so, libLLVMAArch64Info.so, libLLVMAArch64Utils.so, libLLVMABI.so, libLLVMAMDGPUAsmParser.so, libLLVMAMDGPUCodeGen.so, libLLVMAMDGPUDesc.so, libLLVMAMDGPUDisassembler.so, libLLVMAMDGPUInfo.so, libLLVMAMDGPUTargetMCA.so, libLLVMAMDGPUUtils.so, libLLVMARMAsmParser.so, libLLVMARMCodeGen.so, libLLVMARMDesc.so, libLLVMARMDisassembler.so, libLLVMARMInfo.so, libLLVMARMUtils.so, libLLVMAVRAsmParser.so, libLLVMAVRCodeGen.so, libLLVMAVRDesc.so, libLLVMAVRDisassembler.so, libLLVMAVRInfo.so, libLLVMAggressiveInstCombine.so, libLLVMAnalysis.so, libLLVMAsmParser.so, libLLVMAsmPrinter.so, libLLVMBPFAsmParser.so, libLLVMBPFCodeGen.so, libLLVMBPFDesc.so, libLLVMBPFDisassembler.so, libLLVMBPFInfo.so, libLLVMBinaryFormat.so, libLLVMBitReader.so, libLLVMBitWriter.so, libLLVMBitstreamReader.so, libLLVMCAS.so, libLLVMCFGuard.so, libLLVMCFIVerify.so, libLLVMCGData.so, libLLVMCodeGen.so, libLLVMCodeGenTypes.so, libLLVMCore.so, libLLVMCoroutines.so, libLLVMCoverage.so, libLLVMDTLTO.so, libLLVMDWARFCFIChecker.so, libLLVMDWARFLinker.so, libLLVMDWARFLinkerClassic.so, libLLVMDWARFLinkerParallel.so, libLLVMDWP.so, libLLVMDebugInfoBTF.so, libLLVMDebugInfoCodeView.so, libLLVMDebugInfoDWARF.so, libLLVMDebugInfoDWARFLowLevel.so, libLLVMDebugInfoGSYM.so, libLLVMDebugInfoLogicalView.so, libLLVMDebugInfoMSF.so, libLLVMDebugInfoPDB.so, libLLVMDebuginfod.so, libLLVMDemangle.so, libLLVMDiff.so, libLLVMDlltoolDriver.so, libLLVMExecutionEngine.so, libLLVMExegesis.so, libLLVMExegesisAArch64.so, libLLVMExegesisMips.so, libLLVMExegesisPowerPC.so, libLLVMExegesisRISCV.so, libLLVMExegesisX86.so, libLLVMExtensions.so, libLLVMFileCheck.so, libLLVMFrontendAtomic.so, libLLVMFrontendDirective.so, libLLVMFrontendDriver.so, libLLVMFrontendHLSL.so, libLLVMFrontendOffloading.so, libLLVMFrontendOpenACC.so, libLLVMFrontendOpenMP.so, libLLVMFuzzMutate.so, libLLVMFuzzerCLI.so, libLLVMGlobalISel.so, libLLVMHTTP.so, libLLVMHexagonAsmParser.so, libLLVMHexagonCodeGen.so, libLLVMHexagonDesc.so, libLLVMHexagonDisassembler.so, libLLVMHexagonInfo.so, libLLVMHipStdPar.so, libLLVMIRPrinter.so, libLLVMIRReader.so, libLLVMInstCombine.so, libLLVMInstrumentation.so, libLLVMInterfaceStub.so, libLLVMInterpreter.so, libLLVMJITLink.so, libLLVMLTO.so, libLLVMLanaiAsmParser.so, libLLVMLanaiCodeGen.so, libLLVMLanaiDesc.so, libLLVMLanaiDisassembler.so, libLLVMLanaiInfo.so, libLLVMLibDriver.so, libLLVMLineEditor.so, libLLVMLinker.so, libLLVMLoongArchAsmParser.so, libLLVMLoongArchCodeGen.so, libLLVMLoongArchDesc.so, libLLVMLoongArchDisassembler.so, libLLVMLoongArchInfo.so, libLLVMMC.so, libLLVMMCA.so, libLLVMMCDisassembler.so, libLLVMMCJIT.so, libLLVMMCParser.so, libLLVMMIRParser.so, libLLVMMSP430AsmParser.so, libLLVMMSP430CodeGen.so, libLLVMMSP430Desc.so, libLLVMMSP430Disassembler.so, libLLVMMSP430Info.so, libLLVMMipsAsmParser.so, libLLVMMipsCodeGen.so, libLLVMMipsDesc.so, libLLVMMipsDisassembler.so, libLLVMMipsInfo.so, libLLVMNVPTXCodeGen.so, libLLVMNVPTXDesc.so, libLLVMNVPTXInfo.so, libLLVMObjCARCOpts.so, libLLVMObjCopy.so, libLLVMObject.so, libLLVMObjectYAML.so, libLLVMOptDriver.so, libLLVMOption.so, libLLVMOrcDebugging.so, libLLVMOrcJIT.so, libLLVMOrcShared.so, libLLVMOrcTargetProcess.so, libLLVMPasses.so, libLLVMPerfJITEvents.so, libLLVMPlugins.so, libLLVMPowerPCAsmParser.so, libLLVMPowerPCCodeGen.so, libLLVMPowerPCDesc.so, libLLVMPowerPCDisassembler.so, libLLVMPowerPCInfo.so, libLLVMProfileData.so, libLLVMRISCVAsmParser.so, libLLVMRISCVCodeGen.so, libLLVMRISCVDesc.so, libLLVMRISCVDisassembler.so, libLLVMRISCVInfo.so, libLLVMRISCVTargetMCA.so, libLLVMRemarks.so, libLLVMRuntimeDyld.so, libLLVMSPIRVAnalysis.so, libLLVMSPIRVCodeGen.so, libLLVMSPIRVDesc.so, libLLVMSPIRVInfo.so, libLLVMSandboxIR.so, libLLVMScalarOpts.so, libLLVMSelectionDAG.so, libLLVMSparcAsmParser.so, libLLVMSparcCodeGen.so, libLLVMSparcDesc.so, libLLVMSparcDisassembler.so, libLLVMSparcInfo.so, libLLVMSupport.so, libLLVMSupportLSP.so, libLLVMSymbolize.so, libLLVMSystemZAsmParser.so, libLLVMSystemZCodeGen.so, libLLVMSystemZDesc.so, libLLVMSystemZDisassembler.so, libLLVMSystemZInfo.so, libLLVMTableGen.so, libLLVMTableGenBasic.so, libLLVMTableGenCommon.so, libLLVMTarget.so, libLLVMTargetParser.so, libLLVMTelemetry.so, libLLVMTextAPI.so, libLLVMTextAPIBinaryReader.so, libLLVMTransformUtils.so, libLLVMUBAwareInterpreter.so, libLLVMVEAsmParser.so, libLLVMVECodeGen.so, libLLVMVEDesc.so, libLLVMVEDisassembler.so, libLLVMVEInfo.so, libLLVMVectorize.so, libLLVMWebAssemblyAsmParser.so, libLLVMWebAssemblyCodeGen.so, libLLVMWebAssemblyDesc.so, libLLVMWebAssemblyDisassembler.so, libLLVMWebAssemblyInfo.so, libLLVMWebAssemblyUtils.so, libLLVMWindowsDriver.so, libLLVMWindowsManifest.so, libLLVMX86AsmParser.so, libLLVMX86CodeGen.so, libLLVMX86Desc.so, libLLVMX86Disassembler.so, libLLVMX86Info.so, libLLVMX86TargetMCA.so, libLLVMXCoreCodeGen.so, libLLVMXCoreDesc.so, libLLVMXCoreDisassembler.so, libLLVMXCoreInfo.so, libLLVMXRay.so, libLLVMipo.so, libLTO.so, libRemarks.so.
Installed directories: /usr/include/llvm, /usr/include/llvm-c, /usr/lib/cmake/llvm, /usr/lib/llvm, /usr/share/licenses/llvm, /usr/share/opt-viewer.
Short descriptions
dsymutil |
manipulate archived DWARF debug symbol files |
llc |
LLVM static compiler |
lli |
directly execute programs from LLVM bitcode |
llubi |
LLVM UB-aware Interpreter |
llvm-addr2line |
a drop-in replacement for addr2line |
llvm-ar |
LLVM archiver |
llvm-as |
LLVM assembler |
llvm-bcanalyzer |
LLVM bitcode analyzer |
llvm-cgdata |
LLVM CodeGen Data Tool |
llvm-config |
Print LLVM compilation options |
llvm-cov |
emit coverage information |
llvm-cxxfilt |
LLVM symbol name demangler |
llvm-cxxmap |
Mangled name remapping tool |
llvm-debuginfo-analyzer |
Print a logical representation of low-level debug information. SYNOPSIS DESCRIPTION OPTIONS GENERAL |
llvm-diff |
LLVM structural 'diff' |
llvm-dis |
LLVM disassembler |
llvm-dwarfdump |
dump and verify DWARF debug information |
llvm-dwarfutil |
A tool to copy and manipulate debug info |
llvm-exegesis |
LLVM Machine Instruction Benchmark |
llvm-extract |
extract a function from an LLVM module |
llvm-extract-bundle-entry |
extract an offload bundle entry |
llvm-ifs |
shared object stubbing tool |
llvm-install-name-tool |
LLVM tool for manipulating install-names and rpaths |
llvm-lib |
LLVM lib.exe compatible library tool |
llvm-libtool-darwin |
LLVM tool for creating libraries for Darwin |
llvm-link |
LLVM bitcode linker |
llvm-lipo |
LLVM tool for manipulating universal binaries |
llvm-mc |
LLVM Machine Code Playground |
llvm-mca |
LLVM Machine Code Analyzer |
llvm-nm |
list LLVM bitcode and object file's symbol table |
llvm-objcopy |
object copying and editing tool |
llvm-objdump |
LLVM's object file dumper |
llvm-offload-binary |
LLVM Offload Binary Packager |
llvm-opt-report |
generate optimization report from YAML |
llvm-otool |
Mach-O dumping tool |
llvm-pdbutil |
PDB File forensics and diagnostics Synopsis Description Subcommands pretty |
llvm-profdata |
Profile data tool |
llvm-profgen |
LLVM SPGO profile generation tool |
llvm-ranlib |
generates an archive index |
llvm-readelf |
GNU-style LLVM Object Reader |
llvm-readobj |
LLVM Object Reader |
llvm-reduce |
LLVM automatic testcase reducer. |
llvm-remarkutil |
Remark utility |
llvm-size |
print size information |
llvm-stress |
generate random .ll files |
llvm-strings |
print strings |
llvm-strip |
object stripping tool |
llvm-symbolizer |
convert addresses into source code locations |
llvm-tblgen |
Target Description to C++ Code for LLVM |
llvm-tli-checker |
TargetLibraryInfo vs library checker |
opt |
LLVM optimizer |
Notes
The manual pages are one target, built and installed by name after the main install. LLVM_BUILD_DOCS would put docs-llvm-man in the default build beside docs-dsymutil-man and docs-llvm-dwarfdump-man, which rebuild the same tree into the same output directory at the same time. The set is built from every page of the command guide, including the one for llvm-ir2vec, which this build leaves out, so that page is deleted after the copy.
Every port that builds on LLVM reads its installed CMake package, /usr/lib/cmake/llvm, and takes from it the configuration recorded there: the target list, RTTI, exception handling (off, upstream’s default) and the library layout. A consumer that names one of those on its own command line does not override what LLVMConfig.cmake sets; clang and lld show the effect.