1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Whole-program LLVM bitcode generation in Rust.
//!
//! `rllvm` is a Rust port of [gllvm](https://github.com/SRI-CSL/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`.
// Keeps the public surface deliberate: a `pub` item that no `pub use`
// re-exports is a mistake, not API.
/// Command-line argument parsing for compiler flag classification.
/// Command-line definitions shared by the binaries and the completion
/// generator. Not a supported interface.
/// Incremental bitcode cache for skipping recompilation of unchanged files.
/// Diagnostic utilities for version checking, install hints, and colored output.
/// TOML-based configuration and LLVM tool path resolution.
/// Compiler wrapper traits and LLVM/Clang implementation.
/// Bitcode file analysis via `llvm-dis`.
/// Error types used throughout the crate.
/// Bitcode merge strategies (full link, partial link, archive).
/// Link-time optimization modes and bitcode-path markers.
/// Utility functions for command execution, file manipulation, and LLVM tools.
/// Internal constants for argument patterns, section names, and LLVM version ranges.
pub