mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nouveau: Don't require RTTI and use it only when enabled
The only case RTTI is used in nouveau is type assertion at:
File src/gallium/drivers/nouveau/codegen/nv50_ir.cpp:
assert(typeid(*i) == typeid(*this));
This assertion is used 'to be on the safe side' only and not mandatory.
In Android we do not have rtti for libLLVM therefore this assertion
has to be skipped.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11069>
This commit is contained in:
parent
f389676173
commit
5987f71cb1
2 changed files with 2 additions and 4 deletions
|
|
@ -1649,9 +1649,7 @@ if with_llvm
|
|||
_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
|
||||
endif
|
||||
if not _rtti
|
||||
if with_gallium_nouveau
|
||||
error('The Nouveau driver requires rtti. You either need to turn off nouveau or use an LLVM built with LLVM_ENABLE_RTTI.')
|
||||
elif with_gallium_opencl
|
||||
if with_gallium_opencl
|
||||
error('The Clover OpenCL state tracker requires rtti, you need to turn off clover or use an LLVM built with LLVM_ENABLE_RTTI.')
|
||||
endif
|
||||
if cc.get_id() == 'msvc'
|
||||
|
|
|
|||
|
|
@ -749,7 +749,7 @@ Instruction::clone(ClonePolicy<Function>& pol, Instruction *i) const
|
|||
{
|
||||
if (!i)
|
||||
i = new_Instruction(pol.context(), op, dType);
|
||||
#ifndef NDEBUG // non-conformant assert, so this is required
|
||||
#if !defined(NDEBUG) && defined(__cpp_rtti)
|
||||
assert(typeid(*i) == typeid(*this));
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue