meson build error
In file included from ../src/util/bitscan.h:32:0,
../src/gallium/drivers/nouveau/codegen/nv50_ir.cpp: In member function ‘virtual nv50_ir::Instruction* nv50_ir::Instruction::clone(nv50_ir::ClonePolicy<nv50_ir::Function>&, nv50_ir::Instruction*) const’:
../src/gallium/drivers/nouveau/codegen/nv50_ir.cpp:749:19: error: cannot use typeid with -fno-rtti
assert(typeid(*i) == typeid(*this));
You've either added -no-rtti or are using llvm built without rtti. I can make this a hard error.
(In reply to Dylan Baker from comment #1)
> You've either added -no-rtti or are using llvm built without rtti. I can
> make this a hard error.
Out of curiosity, how does the autotools build deal with this?
Also, I think that this only comes up in one assert in nouveau, so when asserts are disabled (e.g. release builds), it wouldn't bring up a compile error.
It would also be fine to add a #ifdef rtti + #warning or something (does one know in the source if rtti is enabled somehow?).
I don't think that the compiler gives you any way to know, we'd have to pass some a #define ourselves.
autotools just adds it to LLVM targets (radeonsi, llvmpipe, etc). That feels really dangerous to me though, as building with/without rtti changes the ABI and my understanding is that there's no requirement for code with rtti to correctly link with code not using rtti.