Skip to content

llvm-config does not report libs needed for MLGO #60751

Open
@chbaker0

Description

@chbaker0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    build-problemcmakeBuild system in general and CMake in particularmlgo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions