[lld] [lld][COFF][LTO] Implement /lldemit:llvm option (PR #66964)

Greg Rodgers via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 15:14:39 PDT 2023


gregrodgers wrote:

My build is failing with this change. 
FAILED: lib/liblldCOFF.so.18git
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/grodgers/git/trunk18.0/build/llvm-project/./lib  -Wl,--gc-sections -shared -Wl,-soname,liblldCOFF.so.18git -o lib/liblldCOFF.so.18git tools/lld/COFF/CMakeFiles/lldCOFF.dir/CallGraphSort.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Chunks.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/COFFLinkerContext.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/DLL.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Driver.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/DriverUtils.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/ICF.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/InputFiles.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/LLDMapFile.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/MapFile.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/MarkLive.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/MinGW.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/SymbolTable.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Symbols.cpp.o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/grodgers/git/trunk18.0/build/llvm-project/lib:"  lib/liblldCommon.so.18git  -lpthread  lib/libLLVMX86CodeGen.so.18git  lib/libLLVMX86AsmParser.so.18git  lib/libLLVMX86Desc.so.18git  lib/libLLVMX86Disassembler.so.18git  lib/libLLVMX86Info.so.18git  lib/libLLVMAMDGPUCodeGen.so.18git  lib/libLLVMAMDGPUAsmParser.so.18git  lib/libLLVMAMDGPUDisassembler.so.18git  lib/libLLVMLibDriver.so.18git  lib/libLLVMLTO.so.18git  lib/libLLVMPasses.so.18git  lib/libLLVMWindowsDriver.so.18git  lib/libLLVMWindowsManifest.so.18git  lib/libLLVMAMDGPUDesc.so.18git  lib/libLLVMAMDGPUInfo.so.18git  lib/libLLVMAMDGPUUtils.so.18git  lib/libLLVMDebugInfoDWARF.so.18git  lib/libLLVMDebugInfoPDB.so.18git  lib/libLLVMDebugInfoMSF.so.18git  lib/libLLVMObject.so.18git  lib/libLLVMMC.so.18git  lib/libLLVMDebugInfoCodeView.so.18git  lib/libLLVMCore.so.18git  lib/libLLVMBinaryFormat.so.18git  lib/libLLVMOption.so.18git  lib/libLLVMTargetParser.so.18git  lib/libLLVMSupport.so.18git  lib/libLLVMDemangle.so.18git  -Wl,-rpath-link,/home/grodgers/git/trunk18.0/build/llvm-project/lib && :
/usr/bin/ld: tools/lld/COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o: in function `std::_Function_handler<bool (unsigned int, llvm::Module const&), lld::coff::BitcodeCompiler::createConfig()::{lambda(unsigned long, llvm::Module const&)#1}>::_M_invoke(std::_Any_data const&, unsigned int&&, llvm::Module const&)':
LTO.cpp:(.text._ZNSt17_Function_handlerIFbjRKN4llvm6ModuleEEZN3lld4coff15BitcodeCompiler12createConfigEvEUlmS3_E_E9_M_invokeERKSt9_Any_dataOjS3_+0x50): undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::array<unsigned int, 5ul>*)'
collect2: error: ld returned 1 exit status


https://github.com/llvm/llvm-project/pull/66964


More information about the llvm-commits mailing list