[llvm] [llc] Provide `opt` like verifier options (PR #106665)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 05:28:33 PDT 2024
AaronBallman wrote:
I am getting link errors with MSVC after this change:
```
FAILED: bin/LTO.dll lib/LTO.lib
C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=tools\lto\CMakeFiles\LTO.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\Users\aballman\bin\lld-link.exe /nologo tools\lto\CMakeFiles\LTO.dir\LTODisassembler.cpp.obj tools\lto\CMakeFiles\LTO.dir\lto.cpp.obj tools\lto\CMakeFiles\LTO.dir\__\__\resources\windows_version_resource.rc.res /out:bin\LTO.dll /implib:lib\LTO.lib /pdb:bin\LTO.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /DEF:"F:/source/llvm-project/llvm/out/build/x64-Debug/tools/lto/LTO.def" lib\LLVMX86AsmParser.lib lib\LLVMX86CodeGen.lib lib\LLVMX86Desc.lib lib\LLVMX86Disassembler.lib lib\LLVMX86Info.lib lib\LLVMBitReader.lib lib\LLVMCore.lib lib\LLVMCodeGen.lib lib\LLVMLTO.lib lib\LLVMMC.lib lib\LLVMMCDisassembler.lib lib\LLVMSupport.lib lib\LLVMTarget.lib lib\LLVMAsmPrinter.lib lib\LLVMGlobalISel.lib lib\LLVMSelectionDAG.lib lib\LLVMExtensions.lib lib\LLVMPasses.lib lib\LLVMCodeGen.lib lib\LLVMCodeGenTypes.lib lib\LLVMTarget.lib lib\LLVMCFGuard.lib lib\LLVMIRPrinter.lib lib\LLVMObjCARCOpts.lib lib\LLVMCoroutines.lib lib\LLVMipo.lib lib\LLVMInstrumentation.lib lib\LLVMBitWriter.lib lib\LLVMLinker.lib lib\LLVMFrontendOpenMP.lib lib\LLVMScalarOpts.lib lib\LLVMAggressiveInstCombine.lib lib\LLVMInstCombine.lib lib\LLVMFrontendOffloading.lib lib\LLVMVectorize.lib lib\LLVMHipStdPar.lib lib\LLVMTransformUtils.lib lib\LLVMAnalysis.lib lib\LLVMProfileData.lib lib\LLVMSymbolize.lib lib\LLVMDebugInfoDWARF.lib lib\LLVMDebugInfoPDB.lib "C:\Program Files\Microsoft Visual Studio\2022\Professional\DIA SDK\lib\amd64\diaguids.lib" lib\LLVMDebugInfoMSF.lib lib\LLVMDebugInfoBTF.lib lib\LLVMObject.lib lib\LLVMMCParser.lib lib\LLVMMC.lib lib\LLVMDebugInfoCodeView.lib lib\LLVMIRReader.lib lib\LLVMBitReader.lib lib\LLVMAsmParser.lib lib\LLVMCore.lib lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMTextAPI.lib lib\LLVMBinaryFormat.lib lib\LLVMTargetParser.lib lib\LLVMSupport.lib lib\LLVMDemangle.lib psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib ws2_32.lib ntdll.lib delayimp.lib -delayload:shell32.dll -delayload:ole32.dll kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\Users\aballman\bin\lld-link.exe /nologo tools\lto\CMakeFiles\LTO.dir\LTODisassembler.cpp.obj tools\lto\CMakeFiles\LTO.dir\lto.cpp.obj tools\lto\CMakeFiles\LTO.dir\__\__\resources\windows_version_resource.rc.res /out:bin\LTO.dll /implib:lib\LTO.lib /pdb:bin\LTO.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /DEF:F:/source/llvm-project/llvm/out/build/x64-Debug/tools/lto/LTO.def lib\LLVMX86AsmParser.lib lib\LLVMX86CodeGen.lib lib\LLVMX86Desc.lib lib\LLVMX86Disassembler.lib lib\LLVMX86Info.lib lib\LLVMBitReader.lib lib\LLVMCore.lib lib\LLVMCodeGen.lib lib\LLVMLTO.lib lib\LLVMMC.lib lib\LLVMMCDisassembler.lib lib\LLVMSupport.lib lib\LLVMTarget.lib lib\LLVMAsmPrinter.lib lib\LLVMGlobalISel.lib lib\LLVMSelectionDAG.lib lib\LLVMExtensions.lib lib\LLVMPasses.lib lib\LLVMCodeGen.lib lib\LLVMCodeGenTypes.lib lib\LLVMTarget.lib lib\LLVMCFGuard.lib lib\LLVMIRPrinter.lib lib\LLVMObjCARCOpts.lib lib\LLVMCoroutines.lib lib\LLVMipo.lib lib\LLVMInstrumentation.lib lib\LLVMBitWriter.lib lib\LLVMLinker.lib lib\LLVMFrontendOpenMP.lib lib\LLVMScalarOpts.lib lib\LLVMAggressiveInstCombine.lib lib\LLVMInstCombine.lib lib\LLVMFrontendOffloading.lib lib\LLVMVectorize.lib lib\LLVMHipStdPar.lib lib\LLVMTransformUtils.lib lib\LLVMAnalysis.lib lib\LLVMProfileData.lib lib\LLVMSymbolize.lib lib\LLVMDebugInfoDWARF.lib lib\LLVMDebugInfoPDB.lib C:\Program Files\Microsoft Visual Studio\2022\Professional\DIA SDK\lib\amd64\diaguids.lib lib\LLVMDebugInfoMSF.lib lib\LLVMDebugInfoBTF.lib lib\LLVMObject.lib lib\LLVMMCParser.lib lib\LLVMMC.lib lib\LLVMDebugInfoCodeView.lib lib\LLVMIRReader.lib lib\LLVMBitReader.lib lib\LLVMAsmParser.lib lib\LLVMCore.lib lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMTextAPI.lib lib\LLVMBinaryFormat.lib lib\LLVMTargetParser.lib lib\LLVMSupport.lib lib\LLVMDemangle.lib psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib ws2_32.lib ntdll.lib delayimp.lib -delayload:shell32.dll -delayload:ole32.dll kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:tools\lto\CMakeFiles\LTO.dir/intermediate.manifest tools\lto\CMakeFiles\LTO.dir/manifest.res" failed (exit code 1) with the following output:
F:\source\llvm-project\llvm\out\build\x64-Debug\lld-link : error : duplicate symbol: public: class llvm::PreservedAnalyses __cdecl llvm::MachineVerifierPass::run(class llvm::MachineFunction &, class llvm::AnalysisManager<class llvm::MachineFunction> &)
>>> defined at F:\source\llvm-project\llvm\include\llvm\Passes\MachinePassRegistry.def:231
>>> LLVMX86CodeGen.lib(X86CodeGenPassBuilder.cpp.obj)
>>> defined at LLVMCodeGen.lib(MachineVerifier.cpp.obj)
```
reverting the commit locally causes the issues to go away for me. Can you investigate (and revert if there's not a quick fix)?
https://github.com/llvm/llvm-project/pull/106665
More information about the llvm-commits
mailing list