Expand description
Whole-program LLVM bitcode generation in Rust.
rllvm is a Rust port of gllvm that provides
compiler wrappers to transparently build whole-program LLVM bitcode files alongside
normal compilation, and a tool to extract the embedded bitcode.
§Overview
The compiler wrappers (compiler_wrapper) intercept clang/clang++ invocations,
run the real compiler normally, then also generate LLVM bitcode and embed the bitcode
file path into a special section of the output object file. The extraction tool
(rllvm-get-bc) later reads those paths and links the bitcode together.
§Configuration
See config for TOML-based configuration via ~/.rllvm/config.toml.
Modules§
- arg_
parser - Command-line argument parsing for compiler flag classification. Command-line argument parser
- bitcode_
info - Bitcode file analysis via
llvm-dis. Bitcode file analysis usingllvm-dis. - cache
- Incremental bitcode cache for skipping recompilation of unchanged files. Incremental bitcode cache to avoid recompilation of unchanged files.
- compiler_
wrapper - Compiler wrapper traits and LLVM/Clang implementation. Compiler wrapper
- config
- TOML-based configuration and LLVM tool path resolution. TOML-based configuration for rllvm.
- diagnostics
- Diagnostic utilities for version checking, install hints, and colored output. Diagnostic utilities for version checking, install hints, and colored output.
- error
- Error types used throughout the crate. Error types for the rllvm crate.
- lto
- Link-time optimization modes and bitcode-path markers. Link-time optimization support.
- merge
- Bitcode merge strategies (full link, partial link, archive). Bitcode merge strategies for combining extracted bitcode files.
- utils
- Utility functions for command execution, file manipulation, and LLVM tools. Utility functions