no matching constructor for initialization of `llvm::TargetSubtargetInfo` when building with LLVM 12
XAMPPRocky opened this issue · 3 comments
XAMPPRocky commented
When trying to build with LLVM 12, I ran into the following build error. It seems like there was just an extra argument added that isn't handled.
Command
cmake -S .. -DLLVM_DIR=/usr/local/Cellar/llvm/12.0.0/lib/cmake/llvm
LLVM_DIR=/usr/local/Cellar/llvm/12.0.0/lib/cmake/llvm make llvm-cbe
/Users/src/llvm-cbe/lib/Target/CBackend/TargetInfo/../CTargetMachine.h:36:9: error: no matching constructor for initialization of 'llvm::TargetSubtargetInfo'
: TargetSubtargetInfo(TT, CPU, FS, ArrayRef<SubtargetFeatureKV>(),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm/12.0.0/include/llvm/CodeGen/TargetSubtargetInfo.h:61:3: note: candidate constructor not viable: requires 12 arguments, but 11 were provided
TargetSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU,
^
/usr/local/Cellar/llvm/12.0.0/include/llvm/CodeGen/TargetSubtargetInfo.h:76:3: note: candidate constructor not viable: requires 1 argument, but 11 were provided
TargetSubtargetInfo(const TargetSubtargetInfo &) = delete;
^
/usr/local/Cellar/llvm/12.0.0/include/llvm/CodeGen/TargetSubtargetInfo.h:75:3: note: candidate constructor not viable: requires 0 arguments, but 11 were provided
TargetSubtargetInfo() = delete;
^
hikari-no-yume commented
We only just got LLVM 11 support (#91), there's no LLVM 12 support yet unfortunately.
If this is the only problem, it might be easy to fix.
jfm535 commented
this is also handled by my pull req #140 The reason for its failure is a missing field called TuneCPU
dpaoliello commented
LLVM 16 is now supported #164