Skip to content
Hugo edited this page Feb 26, 2026 · 2 revisions

CoreTrace Compiler

CoreTrace Compiler is a Clang/LLVM wrapper compiler with optional IR instrumentation. It keeps Clang-compatible CLI behavior while adding runtime diagnostics for memory and call safety.

Quick Start

Main Capabilities

  • Compile C/C++ to object files, assembly, LLVM IR, or executables
  • Run in two modes:
    • ToFile: standard driver pipeline and filesystem outputs
    • ToMemory: LLVM IR captured in-process and returned as a string/stdout
  • Inject optional LLVM instrumentation passes:
    • allocation tracking
    • bounds checking
    • function tracing
    • virtual call diagnostics
  • Link the instrumentation runtime automatically when --instrument is enabled

Recommended Reading Order

  1. Getting Started
  2. CLI Reference
  3. Instrumentation
  4. Runtime Library
  5. Toolchain Detection
  6. Testing and Validation
  7. Troubleshooting

Quick Commands

# Plain compilation
./build/cc hello.c -o hello

# Instrumented binary
./build/cc --instrument --ct-modules=trace,alloc,bounds hello.c -o hello_inst

# LLVM IR in memory (stdout)
./build/cc --in-mem -emit-llvm hello.c

Clone this wiki locally