rust-mos
rust-mos copied to clipboard
Build failure in llvm-wrapper
Thanks for your work on this project!
When compiling llvm-wrapper/PassWrapper.cpp
I get this error:
cargo:warning=llvm-wrapper/PassWrapper.cpp:321:57: error: no member named 'getCPUTable' in 'llvm::MCSubtargetInfo'
cargo:warning= const ArrayRef<SubtargetSubTypeKV> CPUTable = MCInfo->getCPUTable();
cargo:warning= ~~~~~~ ^
This is with https://github.com/llvm-mos/llvm-mos/commit/50b5e6c217232fdba65e40966cc83e1b4354ed42 and https://github.com/llvm-mos/llvm-mos-sdk/commit/3db8fe6f53f51f5c4f5e4dd4e09ac2537ce709ce (so pretty much the current commits at the time of writing). Is there something I can do to fix this?
Just as an exercise I removed the references to getCPUTable
and the hardware features table and replaced them with some dummy values (1 CPU, no features). This caused the rest of the compilation to succeed. However, trying to compile any example rust code causes a crash inside the compiler so I guess having no hardware features is not really an option :)
I've also tried a build with the revisions mentioned in https://github.com/mrk-its/rust-mos/issues/16 but that returns the same error.
@sagacity
I had the same problems and got this running by setting llvm-has-rust-patches to false in the config.toml.
Also I used his llvm-mos fork from here: https://github.com/mrk-its/llvm-mos