LLVM-TLI-CHECKER(1)
π LLVM-TLI-CHECKER β the TargetLibraryInfo vs. library checker, bestie edition π
okay so this is llvm-tli-checker, from the LLVM squad (it's an LLVM manual page, iykyk) β and it's literally the tool that catches the compiler telling lies about your libraries. grab a strawberry π and let's get into it.
β¨ NAME β¨
llvm-tli-checker β TargetLibraryInfo vs library checker. that's the whole vibe: TLI vs. ur actual library files, in a head-to-head.
π SYNOPSIS π
llvm-tli-checker [options] [library-file...]
π¦ DESCRIPTION π¦
so what it does: llvm-tli-checker takes TargetLibraryInfo's opinion about whether library functions are available, and compares it against the set of functions actually exported by the library files you point it at. then it reports every disagreement between what TLI thinks and whether the function is genuinely present. π«Ά
this is highkey for vendors β the people who need to make sure the TLI for their target is correct, so the compiler doesn't "optimize" some code sequence into a library call that is not actually available. like imagine the compiler being that confident and that wrong. π
π₯ 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.
the << is "TLI said yes, SDK said no", the >> is "TLI said no, SDK said yes", and == is the sweet spot where everybody agrees. 234 out of 235 matching and it still says FAIL, because one disagreement is one too many. iconic behavior honestly. π
πΈ OPTIONS πΈ
--dump-tliβ prints"available"/"not available"for each library function, based on TargetLibraryInfo's info for the triple you specified, then dips out (exits). and no, it does not read any input files. this one's just for looking. π--help,-hβ prints a summary of the command line options and exits. classic.--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 being kept in a response file. π--report=<level>β how much tea gets spilled.<level>can besummary,discrepancy, orfull:summarygives you only the count of matching and mis-matching symbolsdiscrepancylists the mis-matching symbolsfulllists all symbols known to TLI, matching or mis-matching- the default is
discrepancy.
--separateβ reads and reports a summary for each library file separately. this is useful for identifying library files that don't contribute anything that TLI knows about. it implies--report=summary(and yes, that can be overridden). π--triple=<triple>β the triple to use for initializing TargetLibraryInfo. that's it, that's the one.@<FILE>β reads command-line options and/or library names from the response file<FILE>. π§
β EXIT STATUS β
llvm-tli-checker returns 0 even if there are mismatches β yeah, it's chill like that. it returns a non-zero exit code if there is an unrecognized option, or if no input files are provided. so it'll forgive a wrong library but not a wrong flag. π
fr fr β mismatches are NOT a failure exit. don't script around exit codes expecting them to catch discrepancies, because they won't. read the report instead. π
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/). we stan. π«Ά
π COPYRIGHT π
2003-2023, LLVM Project
and that's the whole page, bestie β no cap, every flag accounted for. this gem is from the LLVM Project, version/date situation being 15 and 2023-01-14 (dropped in LLVM-TLI-CHECKER(1) style, as one does). go check ur TLI, slay, and remember: the compiler does not get to invent library calls. periodt. πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms