<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60751>60751</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`llvm-config` does not report libs needed for MLGO
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chbaker0
</td>
</tr>
</table>
<pre>
When built with MLGO enabled, a couple LLVM libs use a tensorflow library built in-tree. However, `llvm-config` does not list these dependencies. This makes it difficult to integrate such an LLVM build into another build that doesn't care whether MLGO is enabled...
```
$ bin/llvm-config --libs --system-libs analysis
-lLLVMAnalysis -lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMSupport -lLLVMDemangle
-lrt -ldl -lpthread -lm -lz -lxml2
$ bin/llvm-nm -uC lib/libLLVMAnalysis.a | grep tensorflow
U tensorflow::XlaCompiledCpuFunction::Run()
U tensorflow::XlaCompiledCpuFunction::XlaCompiledCpuFunction(tensorflow::XlaCompiledCpuFunction::StaticData const&, tensorflow::XlaCompiledCpuFunction::AllocMode)
U tensorflow::XlaCompiledCpuFunction::~XlaCompiledCpuFunction()
U tensorflow::XlaCompiledCpuFunction::LookupArgIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
U tensorflow::XlaCompiledCpuFunction::LookupResultIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVU2P4jgQ_TXmUgoKDp-HHGgYdltqNC16dmZvrUpcJN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