| IWYU_TOOL(1) | User Commands | IWYU_TOOL(1) |
NAME¶
iwyu_tool - Include-what-you-use compilation database driver
SYNOPSIS¶
iwyu_tool |
[-h] [-v] [-o FORMAT] [-j JOBS] -p build-path [source ...] -- [IWYU-args] |
DESCRIPTION¶
Driver to consume a compilation database and invoke
OPTIONS¶
positional arguments:¶
- source
- Zero or more source files to run IWYU on. Defaults to all in compilation database.
optional arguments:¶
- -h, --help
- Show help message and exit.
- -v, --verbose
- Print IWYU commands.
- -o FORMAT, --output-format FORMAT
- Select output format, which may be one of:
- iwyu
- Native output format of (default)
- clang
- Format similar to the output of where issues are reported as errors.
- clang-warning
- Similar to clang, but issues are reported as warnings.
- -j JOBS, --jobs JOBS
- Number of concurrent subprocesses.
- -p build-path
- Compilation database path. Either a path to a directory containing a file named compile_commands.json or to the file itself.
- IWYU-args
- All further arguments after the separator -- are passed on to each invocation of
FILES¶
- compile_commands.json
- Compilation database file.
NOTES¶
Assumes is available on the PATH.
EXAMPLE¶
Example usage with on Unix systems:
$ mkdir build && cd build $ CC="clang" CXX="clang++" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ... $ iwyu_tool -p .
SEE ALSO¶
| May 2026 | iwyu_tool 8.23 |