Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chbaker0 opened this issue Feb 14, 2023 · 0 comments
Open

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

chbaker0 opened this issue Feb 14, 2023 · 0 comments
Labels
build-problem cmake Build system in general and CMake in particular mlgo

Comments

@chbaker0
Copy link
Contributor

chbaker0 commented Feb 14, 2023

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
@dtcxzyw dtcxzyw added cmake Build system in general and CMake in particular build-problem and removed new issue labels Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem cmake Build system in general and CMake in particular mlgo
Projects
None yet
Development

No branches or pull requests

3 participants