mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 20:20:18 +01:00
meson: Allow mismatching RTTI for MSVC
This might be safe to relax to all Windows compilers, but I didn't test Clang or MinGW, so scoping to MSVC for now. For MSVC, this is safe to mismatch, because the vftables are emitted into all objects with "pick largest," and the definition with RTTI is larger than the one without. This is different than the Itanium ABI, which only emits one copy of the typeinfo in the object which defines the key method. Acked-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13064>
This commit is contained in:
parent
ad86267412
commit
f9a46ad22a
1 changed files with 21 additions and 20 deletions
|
|
@ -1734,9 +1734,11 @@ if with_llvm
|
||||||
error('SWR requires LLVM draw support.')
|
error('SWR requires LLVM draw support.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if cc.get_id() != 'msvc'
|
||||||
# LLVM can be built without rtti, turning off rtti changes the ABI of C++
|
# LLVM can be built without rtti, turning off rtti changes the ABI of C++
|
||||||
# programs, so we need to build all C++ code in mesa without rtti as well to
|
# programs, so we need to build all C++ code in mesa without rtti as well to
|
||||||
# ensure that linking works.
|
# ensure that linking works. Note that MSVC does handle mismatching RTTI
|
||||||
|
# without issues, so only apply this for other compilers.
|
||||||
#
|
#
|
||||||
# In meson 0.51.0 we can use cmake to find LLVM in addittion to meson's
|
# In meson 0.51.0 we can use cmake to find LLVM in addittion to meson's
|
||||||
# builtin llvm-config based finder. A new generic variable getter method
|
# builtin llvm-config based finder. A new generic variable getter method
|
||||||
|
|
@ -1754,8 +1756,7 @@ if with_llvm
|
||||||
error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
|
error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
if cc.get_id() == 'msvc'
|
|
||||||
# Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
|
# Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
|
||||||
add_project_link_arguments(
|
add_project_link_arguments(
|
||||||
'/ignore:4199',
|
'/ignore:4199',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue