[llvm] [AMDGPU] MCExpr-ify MC layer kernel descriptor (PR #80855)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 08:04:34 PDT 2024


dtcxzyw wrote:

> && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -w -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/dtcxzyw/WorkSpace/Projects/compilers/LLVM/llvm-build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMAMDGPUUtils.so.19.0git -o lib/libLLVMAMDGPUUtils.so.19.0git lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUAsmUtils.cpp.o lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUBaseInfo.cpp.o lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUMemoryUtils.cpp.o lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUPALMetadata.cpp.o lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDKernelCodeTUtils.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/dtcxzyw/WorkSpace/Projects/compilers/LLVM/llvm-build/lib:"  lib/libLLVMAnalysis.so.19.0git  lib/libLLVMCodeGenTypes.so.19.0git  lib/libLLVMCore.so.19.0git  lib/libLLVMMC.so.19.0git  lib/libLLVMBinaryFormat.so.19.0git  lib/libLLVMTargetParser.so.19.0git  lib/libLLVMSupport.so.19.0git  -Wl,-rpath-link,/home/dtcxzyw/WorkSpace/Projects/compilers/LLVM/llvm-build/lib && :
/usr/bin/ld: lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUBaseInfo.cpp.o: in function `llvm::AMDGPU::getDefaultAmdhsaKernelDescriptor(llvm::MCSubtargetInfo const*, llvm::MCContext&)':
AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0xbb): undefined reference to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)'
/usr/bin/ld: AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0xdf): undefined reference to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)'
/usr/bin/ld: AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0x111): undefined reference to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)'
/usr/bin/ld: AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0x145): undefined reference to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)'
/usr/bin/ld: AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0x164): undefined reference to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)'
/usr/bin/ld: lib/Target/AMDGPU/Utils/CMakeFiles/LLVMAMDGPUUtils.dir/AMDGPUBaseInfo.cpp.o:AMDGPUBaseInfo.cpp:(.text._ZN4llvm6AMDGPU32getDefaultAmdhsaKernelDescriptorEPKNS_15MCSubtargetInfoERNS_9MCContextE+0x17c): more undefined references to `llvm::AMDGPU::MCKernelDescriptor::bits_set(llvm::MCExpr const*&, llvm::MCExpr const*, unsigned int, unsigned int, llvm::MCContext&)' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

This PR causes a linker error :(

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


More information about the llvm-commits mailing list