Hello,
After https://reviews.llvm.org/D142241, building llvm and lldb together with BUILD_SHARED_LIBS=ON
fails with
ld.lld: error: undefined symbol: llvm::errs()
>>> referenced by Instrument.cpp:162 (/usr/local/google/home/aheejin/llvm-git/lldb/tools/lldb-instr/Instrument.cpp:162)
>>> tools/lldb/tools/lldb-instr/CMakeFiles/lldb-instr.dir/Instrument.cpp.o:(main)
ld.lld: error: undefined symbol: llvm::vfs::getRealFileSystem()
>>> referenced by Instrument.cpp:171 (/usr/local/google/home/aheejin/llvm-git/lldb/tools/lldb-instr/Instrument.cpp:171)
>>> tools/lldb/tools/lldb-instr/CMakeFiles/lldb-instr.dir/Instrument.cpp.o:(main)
...
...
It looks the CL description says having CLANG_LIBS
and LINK_COMPONENTS Support
within a single file is a problem, but there are many files in lldb that use both:
./lldb/source/Core/CMakeLists.txt
./lldb/source/Plugins/TypeSystem/Clang/CMakeLists.txt
./lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
./lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
./lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
./lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
./lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
./lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
./lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
I commented on that CL, but it wasn’t answered and I was not sure if it was seen, so I’m asking it here too. Can we restore this
LINK_COMPONENTS
Support
in lldb/tools/lldb-instr/CMakeLists.txt
?