JuliaHubOSS / llvm-cbe

resurrected LLVM "C Backend", with improvements
Other
826 stars 141 forks source link

compilation fails with LLVM 12 #136

Closed nonchip closed 1 year ago

nonchip commented 3 years ago

Getting multiple errors:

llvm-cbe/lib/Target/CBackend/CTargetMachine.h:44:20: error: no matching function for call to 'llvm::TargetSubtargetInfo::TargetSubtargetInfo(const llvm::Triple&, llvm::StringRef&, llvm::StringRef&, llvm::ArrayRef<llvm::SubtargetFeatureKV>, llvm::ArrayRef<llvm::SubtargetSubTypeKV>, std::nullptr_t, std::nullptr_t, std::nullptr_t, std::nullptr_t, std::nullptr_t, std::nullptr_t)'
llvm-cbe/lib/Target/CBackend/CBackend.cpp:1692:15: error: 'class llvm::IntegerType' has no member named 'isPowerOf2ByteWidth'
llvm-cbe/lib/Target/CBackend/CBackend.cpp:2650:64: error: invalid conversion from 'unsigned int' to 'const llvm::VectorType*' [-fpermissive]
llvm-cbe/lib/Target/CBackend/CBackend.cpp:2692:70: error: invalid conversion from 'unsigned int' to 'const llvm::VectorType*' [-fpermissive]
llvm-cbe/lib/Target/CBackend/CBackend.cpp:2930:17: error: 'class llvm::IntegerType' has no member named 'isPowerOf2ByteWidth'
llvm-cbe/lib/Target/CBackend/CBackend.cpp:5437:15: error: 'class llvm::IntegerType' has no member named 'isPowerOf2ByteWidth'

attached the result of { cmake -S .. && make } > log.txt 2>&1: log.txt

hikari-no-yume commented 3 years ago

We don't have LLVM 12 support yet, so in some sense this is expected. It would be good to add support for it though.

nonchip commented 3 years ago

yeah i actually didn't even notice that about "works on 10 and kinda on 11", and especially since your readme tells people to use their package managers, i can imagine the amount of llvm12s you encounter to only grow over time

hikari-no-yume commented 3 years ago

Sure. For the moment, your distribution may let you install LLVM 11 (Ubuntu does for instance).

jfm535 commented 3 years ago

my pull req #140 contains fixes for these issues