LLVM-TLI-CHECKER(1)

πŸ’… llvm-tli-checker β€” the TargetLibraryInfo vs library checker, bestie edition

okay so this is llvm-tli-checker(1), straight out of the LLVM manual fam β€” it's the vibe check between what TLI thinks exists and what your library actually exports, and honestly it's giving main character energy 🫢


✨ NAME ✨

llvm-tli-checker β€” TargetLibraryInfo vs library checker. that's it, that's the whole mood πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: llvm-tli-checker takes TargetLibraryInfo's whole opinion about whether library functions are available, and holds it up next to the actual set of functions exported by the library files you handed it. Then it reports every single disagreement between TLI's opinion and whether the function is actually present. like, no cap, it's a full-on receipts situation 😭

This is highkey useful for vendors β€” it's literally there so you can make sure the TLI for your target is correct, and so the compiler doesn't go and "optimize" some code sequence into a library call that is not actually available. that would be so embarrassing for everyone involved πŸ’€


πŸŽ€ EXAMPLE πŸŽ€

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

and yes the FAIL at the end is real β€” she's dramatic but she's honest πŸ™ˆ


⭐ OPTIONS ⭐

  • --dump-tli β€” prints "available" / "not available" for every single library function, according to TargetLibraryInfo's info for the triple you specified, then dips out. lowkey important: this option does not read any input files. none. zero. it's not even looking at them πŸ‘€
  • --help, -h β€” prints a summary of the command line options and exits. the classic, the icon, the legend πŸ’–
  • --libdir=<directory> β€” a base directory that gets prepended to each library file path. so handy when you've got a bunch of library files all chilling in the same directory, or when a whole list of input filenames is being kept in a response file. it's giving organized queen πŸŽ€
  • --report=<level> β€” how much info you want reported. <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. choose your fighter bestie βš”οΈ

  • --separate β€” reads and reports a summary for each library file separately. super useful for spotting library files that don't contribute anything TLI knows about. heads up: this implies --report=summary (and yes, you can override that) 🌈
  • --triple=<triple> β€” the <triple> to use when initializing TargetLibraryInfo. it's the target's whole identity, respect it πŸ’…
  • @<FILE> β€” reads command-line options and/or library names from the response file <FILE>. iykyk, response files ate πŸ“

πŸ”₯ EXIT STATUS πŸ”₯

okay so llvm-tli-checker returns 0 even if there are mismatches β€” yes, even then, she's chill like that 😌. But she returns a non-zero exit code if there's an unrecognized option, or if no input files are provided. so bring your files, bestie, or it's a wrap πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/). absolute icons, no notes 🫢


2003-2025, LLVM Project


and that's the whole page, bestie β€” version 19, dated 2025-01-17, delivered with love from the LLVM manual ✨ go forth and check those symbols, periodt πŸ’…πŸ¦‹

πŸ“¦ where this page comes from