LLVM-TLI-CHECKER(1)

πŸ’– LLVM-TLI-CHECKER(1) πŸ’–

okay bestie, welcome to the llvm-tli-checker page β€” it's a little tool from the LLVM manual, and she's a vibe checker for your libraries. sit down, grab a boba, we're doing this πŸ§‹βœ¨


🌸 NAME 🌸

llvm-tli-checker β€” the TargetLibraryInfo vs library checker, aka the girl who compares what your compiler thinks exists to what's actually there πŸ’…


✨ SYNOPSIS ✨

llvm-tli-checker [options] [library-file...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: llvm-tli-checker takes TargetLibraryInfo's whole opinion on whether library functions are available, and compares it against the actual set of functions that the library files you gave it export. then it reports every single disagreement between what TLI believes and whether the function is literally actually present. no cap.

who is this for? vendors, mostly 🫢 β€” if you're a vendor you use this to make sure the TLI for your target is correct, so the compiler doesn't go and "optimize" some code sequence into a library call that... does not exist. which would be a whole mess. πŸ’€


πŸŽ€ EXAMPLE πŸŽ€

okay let's see her in action, this is the moment:

$ 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.

see those << and >>? that's the drama, that's the mismatch energy 😭 one symbol TLI said yes to but the SDK said no, one the other way around, and 234 that everyone agrees on. iconic, honestly. but still β€” FAIL πŸ’€


πŸ‘‘ OPTIONS πŸ‘‘

  • --dump-tli β€” prints "available" / "not available" for every single library function, based on what TargetLibraryInfo says for the triple you specified, and then dips out. heads up bestie: this one does not read any input files. zero. none. πŸ™ˆ
  • --help, -h β€” prints a lil summary of the command line options and exits. the classic. the icon. ✨
  • --libdir=<directory> β€” a base directory that gets prepended to each library file path 🫢 super handy when you've got a bunch of library files all chillin' in the same directory, or when a list of input filenames is kept in a response file.
  • --report=<level> β€” how much info you wanna hear about. <level> can be summary, discrepancy, or full πŸ’…
    • summary gives you only the count of matching and mis-matching symbols
    • discrepancy lists the mis-matching symbols
    • full lists all symbols known to TLI, matching or mis-matching
    • the default is discrepancy
  • --separate β€” reads and reports a summary for each library file separately, which is lowkey useful for spotting the library files that don't contribute anything TLI knows about. this implies --report=summary (and yes, you can override that).
  • --triple=<triple> β€” the triple to use for initializing TargetLibraryInfo. that's it, that's the whole thing. 🎯
  • @<FILE> β€” read command-line options and/or library names from response file <FILE>. cute lil shortcut, iykyk πŸ’–

πŸ’€ EXIT STATUS πŸ’€

not me about to tell you she returns 0 even if there are mismatches 😭 like girl, be dramatic about it?? but no β€” she only returns a non-zero exit code if there's an unrecognized option, or if no input files were provided. so mismatches alone won't trip her up. periodt.


🫢 AUTHOR 🫢

Maintained by the LLVM Team (https://llvm.org/). they're the parents, we're just vibing in their house 🌈


2003-2025, LLVM Project


and that's the whole page bestie!! slay πŸŽ€πŸ¦‹ this was page 20, dated 2025-09-03, brought to you by LLVM β€” mwah, go check your symbols, ily πŸ’–βœ¨

πŸ“¦ where this page comes from