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 be summary, discrepancy, or full. here's the breakdown:
    • 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 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-checker returns 0 even 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. πŸ‘‘


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