[Mlir-commits] [mlir] [mlir] Specify deps via `LLVM_LINK_COMPONENTS` (PR #118542)
Konrad Kleine
llvmlistbot at llvm.org
Tue Dec 3 14:21:39 PST 2024
kwk wrote:
Apparently this fails on Linux:
```
[6302/6517] Linking CXX executable tools/mlir/unittests/Target/LLVM/MLIRTargetLLVMTests
FAILED: tools/mlir/unittests/Target/LLVM/MLIRTargetLLVMTests
: && /usr/bin/clang++ -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -Wl,--gc-sections tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeNVVMTarget.cpp.o tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeROCDLTarget.cpp.o tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeToLLVMBitcode.cpp.o -o tools/mlir/unittests/Target/LLVM/MLIRTargetLLVMTests -lLLVMLLVMX86CodeGen -lLLVMLLVMX86Desc -lLLVMLLVMX86Info lib/libLLVMSupport.a lib/libllvm_gtest_main.a lib/libllvm_gtest.a lib/libMLIRTargetLLVM.a lib/libMLIRNVVMTarget.a lib/libMLIRROCDLTarget.a lib/libMLIRGPUDialect.a lib/libMLIRNVVMDialect.a lib/libMLIRLLVMDialect.a lib/libMLIRLLVMToLLVMIRTranslation.a lib/libMLIRBuiltinToLLVMIRTranslation.a lib/libMLIRNVVMToLLVMIRTranslation.a lib/libMLIRROCDLToLLVMIRTranslation.a lib/libMLIRGPUToLLVMIRTranslation.a -lpthread lib/libLLVMNVPTXCodeGen.a lib/libLLVMNVPTXDesc.a lib/libLLVMNVPTXInfo.a lib/libMLIRTargetLLVM.a lib/libMLIRROCDLDialect.a lib/libMLIRExecutionEngineUtils.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMPasses.a lib/libLLVMCoroutines.a lib/libLLVMipo.a lib/libLLVMLinker.a lib/libLLVMCFGuard.a lib/libLLVMVectorize.a lib/libLLVMSandboxIR.a lib/libLLVMInstrumentation.a lib/libLLVMHipStdPar.a lib/libLLVMIRPrinter.a lib/libLLVMAsmPrinter.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMIRParser.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMObjCARCOpts.a lib/libLLVMCGData.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUUtils.a lib/libLLVMCodeGenTypes.a lib/libLLVMAMDGPUInfo.a lib/libMLIRGPUDialect.a lib/libMLIRMemRefDialect.a lib/libMLIRArithUtils.a lib/libMLIRDialectUtils.a lib/libMLIRComplexDialect.a lib/libMLIRArithDialect.a lib/libMLIRCastInterfaces.a lib/libMLIRInferIntRangeCommon.a lib/libMLIRUBDialect.a lib/libMLIRDialect.a lib/libMLIRShapedOpInterfaces.a lib/libMLIRTargetLLVMIRExport.a lib/libMLIRDLTIDialect.a lib/libMLIRLLVMIRTransforms.a lib/libMLIRNVVMDialect.a lib/libMLIRLLVMDialect.a lib/libLLVMBitWriter.a lib/libMLIRFuncDialect.a lib/libMLIRTransforms.a lib/libMLIRMemorySlotInterfaces.a lib/libMLIRRuntimeVerifiableOpInterface.a lib/libMLIRTranslateLib.a lib/libMLIRParser.a lib/libMLIRBytecodeReader.a lib/libMLIRAsmParser.a lib/libMLIRTransformUtils.a lib/libMLIRSubsetOpInterface.a lib/libMLIRValueBoundsOpInterface.a lib/libMLIRDestinationStyleOpInterface.a lib/libMLIRRewrite.a lib/libMLIRRewritePDL.a lib/libMLIRPDLToPDLInterp.a lib/libMLIRPass.a lib/libMLIRAnalysis.a lib/libMLIRControlFlowInterfaces.a lib/libMLIRInferIntRangeInterface.a lib/libMLIRCallInterfaces.a lib/libMLIRDataLayoutInterfaces.a lib/libMLIRViewLikeInterface.a lib/libMLIRLoopLikeInterface.a lib/libMLIRPresburger.a lib/libMLIRPDLInterpDialect.a lib/libMLIRFunctionInterfaces.a lib/libMLIRPDLDialect.a lib/libMLIRSideEffectInterfaces.a lib/libMLIRInferTypeOpInterface.a lib/libLLVMFrontendOpenMP.a lib/libLLVMFrontendOffloading.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMObject.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMBitReader.a lib/libLLVMTextAPI.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libMLIRIR.a lib/libMLIRSupport.a lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/x86_64-linux-gnu/libz.so lib/libLLVMDemangle.a && :
ld.lld: error: unable to find library -lLLVMLLVMX86CodeGen
ld.lld: error: unable to find library -lLLVMLLVMX86Desc
ld.lld: error: unable to find library -lLLVMLLVMX86Info
```
Maybe I need to guard my change with `if (LLVM_LINK_LLVM_DYLIB)`.
https://github.com/llvm/llvm-project/pull/118542
More information about the Mlir-commits
mailing list