Skip to content

meson: RTTI fixes/changes

Jesse Natalie requested to merge jenatali/mesa:rtti-mismatch-msvc into main

New version of !12275 (closed)

The first patch fixes RTTI matching for LLVM. Since Meson has a built-in cpp_rtti option, we shouldn't be manually setting -fno-rtti/GR-. Similarly, we shouldn't allow Clover to build if cpp_rtti=false was set. Instead, treat cpp_rtti=false -Dgallium-opencl=<not disabled> as an error, and also error if cpp_rtti mismatches LLVM's RTTI.

The second patch disables that mismatching check for MSVC, where I'm quite confident it's safe to allow that mismatch, based on two things:

  1. My research into how the linker actually makes it work.
  2. If it wasn't, the linker would give a hard error like it does on other mismatches.

This could probably be relaxed across the board for Windows compilers/linkers, but I haven't investigated how Clang's Windows support or MinGW's tools would handle this, so just scoping to MSVC for now.

/cc @currojerez @dbaker

Merge request reports