forked from OSchip/llvm-project
[mlir][AMDGPU] Set ABI version constant when linking device libs
Currently, linking the device libraries requires setting a constant that indicates the code object ABI version the compilation is targeting. This fixes the MLIR linking process by setting this constant to 400, which is the value corresponding to the current code object ABI default, version 4. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D126913
This commit is contained in:
parent
f62baddac0
commit
a2cdb9791b
|
@ -262,6 +262,10 @@ SerializeToHsacoPass::translateToLLVMIR(llvm::LLVMContext &llvmContext) {
|
|||
.getZExtValue();
|
||||
uint32_t isaNumber = minor + 1000 * major;
|
||||
addControlConstant("__oclc_ISA_version", isaNumber, 32);
|
||||
|
||||
// This constant must always match the default code object ABI version
|
||||
// of the AMDGPU backend.
|
||||
addControlConstant("__oclc_ABI_version", 400, 32);
|
||||
}
|
||||
|
||||
// Determine libraries we need to link - order matters due to dependencies
|
||||
|
|
Loading…
Reference in New Issue