FTBFS: src/amd/llvm/ac_llvm_util.c:248:4: error: implicit declaration of function ‘LLVMAddIPSCCPPass’ (LLVM C interface removed upstream)
Error on builds with recent versions of LLVM 17:
../src/amd/llvm/ac_llvm_util.c: In function ‘ac_create_passmgr’: ../src/amd/llvm/ac_llvm_util.c:248:4: error: implicit declaration of function ‘LLVMAddIPSCCPPass’; did you mean ‘LLVMAddSCCPPass’? [-Werror=implicit-function-declaration] 248 | LLVMAddIPSCCPPass(passmgr); | ^~~~~~~~~~~~~~~~~ | LLVMAddSCCPPass
The LLVM C interface was removed upstream in commit b677d0753c0. The replacement seems to be: use
llvm/Transforms/IPO/SCCP.h directly, from what I understand. But that would probably require the new pass manager and AC is not yet using that, but is using the legacy pass manager with
I don't think I do have the time available to convert all of AC to the new interface, but I would be more than willing to test any patches for this.