Metadata-Version: 2.4
Name: llvm-cov
Version: 23.1.6
Summary: llvm-cov and llvm-profdata, LLVM's code coverage tools, packaged as Python wheels
Project-URL: Documentation, https://llvm.org/docs/CommandGuide/llvm-cov.html
Project-URL: Source-based coverage, https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
Project-URL: Binaries, https://github.com/cpp-linter/clang-tools-static-binaries
Project-URL: Source, https://github.com/cpp-linter/llvm-cov-wheel
Project-URL: Issues, https://github.com/cpp-linter/llvm-cov-wheel/issues
Author: The LLVM project
Maintainer-email: Xianpeng Shen <xianpeng.shen@gmail.com>
License-Expression: Apache-2.0 WITH LLVM-exception
License-File: upstream/LICENSE.TXT
Keywords: c,c++,clang,coverage,llvm,llvm-cov,llvm-profdata
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: C
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Description-Content-Type: text/markdown

# llvm-cov-wheel

[![PyPI](https://img.shields.io/pypi/v/llvm-cov?labelColor=454a63&color=007ec6)](https://pypi.org/project/llvm-cov/)
[![ci](https://img.shields.io/github/actions/workflow/status/cpp-linter/llvm-cov-wheel/test.yml?branch=main&label=ci&labelColor=454a63)](https://github.com/cpp-linter/llvm-cov-wheel/actions/workflows/test.yml)
[![part of cpp-linter](https://img.shields.io/badge/part%20of-cpp--linter-ffc20a?labelColor=454a63)](https://cpp-linter.github.io/)

LLVM's code coverage tools, [`llvm-cov`](https://llvm.org/docs/CommandGuide/llvm-cov.html) and
[`llvm-profdata`](https://llvm.org/docs/CommandGuide/llvm-profdata.html), as Python wheels on
PyPI. One `pip install` gives you both commands, for any LLVM version from 12 to 23, on Linux,
macOS and Windows, x86_64 and arm64.

[Website](https://cpp-linter.github.io/) ·
[PyPI](https://pypi.org/project/llvm-cov/) ·
[Source-based coverage guide](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) ·
[Discussions](https://github.com/orgs/cpp-linter/discussions)

## Quick start

```bash
pip install llvm-cov        # or: uv tool install llvm-cov
llvm-cov --version
llvm-profdata --version
```

Pick the version that matches your compiler. The raw profiles that `clang` writes change format
between LLVM releases, so `llvm-profdata` should come from the same major version as `clang`:

```bash
pip install "llvm-cov==18.*"   # for clang 18
```

## Usage

Source-based coverage with clang:

```bash
clang++ -fprofile-instr-generate -fcoverage-mapping -o app main.cpp
LLVM_PROFILE_FILE=app.profraw ./app
llvm-profdata merge -sparse app.profraw -o app.profdata
llvm-cov report ./app -instr-profile=app.profdata
llvm-cov export ./app -instr-profile=app.profdata -format=lcov > coverage.lcov
```

With [gcovr](https://gcovr.com) and `--coverage` builds:

```bash
pip install gcovr llvm-cov
gcovr --gcov-executable "llvm-cov gcov"
```

`llvm-cov` and `llvm-profdata` are installed straight into the environment's `bin/` (`Scripts\`
on Windows), with no Python wrapper in between.

## Supported platforms

| Platform | Architecture | Wheel tag |
|----------|-------------|-----------|
| **Linux** (glibc 2.17+ and musl) | x86_64 | `manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64` |
| **Linux** (glibc 2.17+ and musl) | aarch64 | `manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64` |
| **macOS** 15+ | Intel (x86_64) | `macosx_15_0_x86_64` |
| **macOS** 11+ | Apple Silicon (arm64) | `macosx_11_0_arm64` |
| **Windows** | x86_64 | `win_amd64` |
| **Windows** | ARM64 | `win_arm64` |

The Linux binaries are fully static, so one wheel works on both glibc and musl distributions.
The macOS tags carry the minimum macOS version that the binaries declare.

The wheel version is the LLVM version, for example `23.1.6`. A packaging-only fix is released as
`23.1.6.1`.

## Where the binaries come from

The wheels contain the `llvm-cov` and `llvm-profdata` binaries of the
[clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries) releases,
unchanged. Those are built from the official LLVM source releases, with build provenance
attestations. `sources.json` pins the SHA-512 of every file, and the build refuses any download
that does not match.

This is not an official LLVM project, so report problems with the tools themselves
[upstream](https://github.com/llvm/llvm-project/issues).

## Contributing

See the [contributing guide](https://github.com/cpp-linter/llvm-cov-wheel/blob/main/CONTRIBUTING.md)
and [open an issue](https://github.com/cpp-linter/llvm-cov-wheel/issues) for packaging bugs and
feature requests.

## License

The build scripts and workflows in this repository are released under the
[MIT License](https://github.com/cpp-linter/llvm-cov-wheel/blob/main/LICENSE). LLVM, and so the
wheels, are under the
[Apache License 2.0 with LLVM Exceptions](https://llvm.org/LICENSE.txt); the wheels carry its
license file.
