Compare compilation database argv
Compare two compile_commands files by ordered declared argv and working directory, retaining sources and every invocation.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Compare two compile_commands files by ordered declared argv and working directory, retaining sources and every invocation.
How to use this tool
- Select the before and after databases in that order.
- Enter paired roots if needed, then compare ordered argv.
- Review added, removed and changed invocations; download complete JSON/CSV and both originals.
- Validate linking, runtime behavior and binary results separately.
Supported inputs and limits
Select exactly two strict UTF-8 JSON files: before first, after second. Each allows 2 MiB, together 4 MiB; each original filename label allows 512 UTF-8 bytes. One leading file BOM is removed and recorded.
POSIX lexical paths only. directory must be absolute; file/output resolve against it. No filesystem lookup or realpath. Optional beforeRoot/afterRoot must be paired absolute roots; component-boundary mapping affects identity and working directory only, never argv. Each root option allows 4,096 UTF-8 bytes as a parameter resource budget.
Match source path plus optional output. Duplicate identities refuse the whole pair. arguments is preferred and retained in complete order with a nonempty executable; command supports a fixed POSIX single/double quote and backslash lexer.
Reject shell expansion, unquoted operators/globs, command control characters, Windows path profiles, command assignment prefixes (such as FOO=1 cc), @response tokens and unknown invocation metadata. When arguments is present, command is retained as original metadata without interpretation or execution.
Across both files: at most 5,000 invocations and 250,000 argv items. JSON containers allow 16 levels; decoded duplicate keys, malformed UTF-8 and unpaired Unicode surrogates refuse. Valid database structure has at most three container levels, so the depth guard is protective.
Download both byte-exact originals, complete compilation-comparison.json and quote-all CSV. Outputs together allow 32 MiB and fail atomically. Every CSV cell has a formula-safe apostrophe prefix; JSON and source bytes preserve original text.
Preview only the first 200 rows and 2,000 Unicode codepoints per cell. Copy is explicitly a summary. Complete matched, added and removed invocations and differing argv indices remain in downloads.
Equality covers ordered declared argv and mapped working directory only. Flag meaning, linking, environment, headers, compiler behavior, ABI and binary equivalence remain unverified. Files and names stay in this browser.
Worked example
Example input
before: [{"directory":"/work","file":"a.c","arguments":["cc","-O0","a.c"]}]; after: same source with -O2Example options
beforeRoot=""; afterRoot=""
Example output
1 changed invocation, argv index 1; 2 originals, full JSON and CSV.
When something does not work
Correct source files, duplicate identities or unsupported shell structures, then retry both originals. After cancellation rerun the same selection.
Frequently asked questions
Does equality prove identical binaries?
Equality covers ordered declared argv and mapped working directory only. Flag meaning, linking, environment, headers, compiler behavior, ABI and binary equivalence remain unverified. Files and names stay in this browser.
Does root mapping hide paths inside argv?
POSIX lexical paths only. directory must be absolute; file/output resolve against it. No filesystem lookup or realpath. Optional beforeRoot/afterRoot must be paired absolute roots; component-boundary mapping affects identity and working directory only, never argv. Each root option allows 4,096 UTF-8 bytes as a parameter resource budget.
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.