modular, fast C/C++/ObjC compiler, static analyzer and tools
Project homepage: https://www.llvm.org/
Description
The LLVM Project is a collection of modular and reusable compiler
and toolchain technologies. Despite its name, LLVM has little to
do with traditional virtual machines, though it does provide helpful
libraries that can be used to build them.
This package includes the LLVM Core and the Clang compiler suite.
The LLVM Core libraries provide a modern source- and target-independent
optimizer, along with code generation support for various popular CPUs
(i386, amd64, powerpc and arm are major targets). These libraries are
built around a well specified code representation known as the LLVM
intermediate representation ("LLVM IR"). The LLVM Core libraries are
well documented, and it is particularly easy to invent your own language
(or port an existing compiler) to use LLVM as an optimizer and code
generator.
Clang is an "LLVM native" C/C++/Objective-C compiler, which aims
to deliver fast compiles, extremely useful error and warning messages
and to provide a platform for building great source level tools.
The Clang Static Analyzer is a tool automatically finds bugs in
your code, and is a great example of the sort of tool that can be
built using the Clang frontend as a library to parse C/C++ code.
Package information
- Ports path
- devel/llvm/22
- Package architecture
- amd64
- Maintainer
- Sebastien Marie <semarie@online.fr>, Robert Nagy <robert@openbsd.org>
- Categories
- devel, lang/python
- Available flavors
- None listed
- Only for architectures
- aarch64, amd64, arm, i386, mips64, mips64el, powerpc, powerpc64, riscv64, sparc64
Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.
Direct dependencies
Runtime
Build
- devel/swig
- textproc/py-sphinx
- textproc/py-recommonmark
- lang/python/3
- devel/cmake/core STEM->=4
- devel/ninja
- archivers/xz STEM->=5.4.0
Test
OpenBSD README
This README contains unresolved ports variables; replace them before using its commands.
+-----------------------------------------------------------------------
| Running llvm-22 on OpenBSD
+-----------------------------------------------------------------------
To use different compiler versions for, e.g. release(8), point mk.conf(5)
at this port:
AR=${TRUEPREFIX}/bin/llvm-ar-${LLVM_MAJOR}
AS=${TRUEPREFIX}/bin/llvm-as-${LLVM_MAJOR}
CC=${TRUEPREFIX}/bin/clang-${LLVM_MAJOR}
CXX=${TRUEPREFIX}/bin/clang++-${LLVM_MAJOR}
CPP=${TRUEPREFIX}/bin/clang-cpp-${LLVM_MAJOR}
LD=${TRUEPREFIX}/bin/ld.lld-${LLVM_MAJOR}
For more information about using scan-build(1) for the static analyser,
look at:
http://clang-analyzer.llvm.org/scan-build.html
For instance, the scanner on the kernel build can be launched with:
cd /usr/src/sys/arch/`uname -m`/conf && config GENERIC.MP
cd /usr/src/sys/arch/`uname -m`/compile/GENERIC.MP
make clean && scan-build make
This will generate HTML reports in /tmp/scan-build-(date).
Used by (70 dependency relationships)
Includes library, runtime, build and test dependencies.