LLVM-TLI-CHECKER(1)
π llvm-tli-checker π
okay bestie, welcome to llvm-tli-checker β aka the TargetLibraryInfo vs library checker, which is a whole mouthful but hear me out because it's actually iconic. it lives in the LLVM manual, section 1 (user commands, for the uninitiated π
).
β¨ SYNOPSIS β¨
llvm-tli-checker [options] [library-file...]
that's it. that's the whole vibe. options, then a pile of library files if you have them. π¦
πΈ DESCRIPTION πΈ
so basically? llvm-tli-checker takes what TargetLibraryInfo thinks it knows about which library functions exist, and compares it against the actual set of functions exported by the library files you hand it. then it reports every disagreement β every place where TLI's opinion and reality do NOT match up. it's giving detective energy fr fr π
who is this for? vendors, mostly. if you're shipping a toolchain and you need to make sure the TLI for your target is actually correct, this is your girl. because the nightmare scenario is the compiler "optimize"-ing some innocent little code sequence into a library call that doesn't actually exist on the target. no cap, that's the bad ending. π
π EXAMPLE π
here's what it looks like in the wild:
$ llvm-tli-checker --triple x86_64-scei-ps4 example.so
TLI knows 466 symbols, 235 available for 'x86_64-scei-ps4'
Looking for symbols in 'example.so'
Found 235 global function symbols in 'example.so'
Found a grand total of 235 library symbols
<< TLI yes SDK no: '_ZdaPv' aka operator delete[](void*)
>> TLI no SDK yes: '_ZdaPvj' aka operator delete[](void*, unsigned int)
<< Total TLI yes SDK no: 1
>> Total TLI no SDK yes: 1
== Total TLI yes SDK yes: 234
FAIL: LLVM TLI doesn't match SDK libraries.
the << and >> arrows are literally just pointing at the disagreements and i am obsessed with how readable that is. π
π OPTIONS π
--dump-tliβ prints "available" / "not available" for every single library function, according to TargetLibraryInfo's info for the triple you specified, and then exits. does not read any input files. it's just vibing and telling you what TLI believes. β--help,-hβ prints a summary of the command line options and dips. classic. π«Ά--libdir=<directory>β a base directory that gets prepended to each library file path. super handy when all your library files live in the same directory, or when you've got a big list of input filenames chilling in a response file. saves you so much typing bestie. π--report=<level>β how much tea gets spilled.<level>can besummary,discrepancy, orfull. here's the breakdown:summarygives you only the count of matching and mis-matching symbols.discrepancylists the mis-matching symbols.fulllists all symbols known to TLI β matching and mis-matching.
the default is discrepancy. π
--separateβ reads and reports a summary for each library file separately. useful for sniffing out library files that don't contribute anything TLI even knows about (rude, honestly). implies--report=summaryβ and yes, you can override that. π--triple=<triple>β the triple to use for initializing TargetLibraryInfo. that's the one. that's the whole job. π―@<FILE>β read command-line options and/or library names from the response file<FILE>. so you can keep your whole config in a file and just point at it. chef's kiss. π§
β EXIT STATUS β
okay listen, this part is important so pay attention:
llvm-tli-checkerreturns0even if there are mismatches. π± yes, really. mismatches are not an error exit.
it returns a non-zero exit code if:
- there's an unrecognized option, or
- no input files are provided.
so if your CI is silently passing while your TLI is a mess... yeah, that's why. check the output, not just the exit code. π
π Author π
maintained by the LLVM Team (https://llvm.org/). absolute legends, no notes. π
πΈ Copyright πΈ
2003-2026, LLVM Project. slay. π
okay that's the whole page bestie, you're officially TLI-literate πβ¨ this was LLVM's llvm-tli-checker page, from the LLVM manual, dated 2026-07-16, and it ate, periodt. go check your symbols. π¦π
π¦ where this page comes from
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms