Add CMake option to build Valhalla with `-fno-rtti`
Open
question
- Dominant language
- C++
- Stars
- 6.2k
- Forks
- 981
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 14
Description
Some projects depending on Valhalla have a requirement to be built with `-fno-rtti` flag(for various reasons, mainly due to binary size). In general there are no any issues with Valhalla and `-fno-rtti`, but from time to time new changes are introduced in Valhalla which explicitly require RTTI: e.g. those ones which use `typeid` or `dynamic_cast`(https://github.com/valhalla/valhalla/pull/3191).
The idea is the following:
1. Introduce CMake option `DISABLE_RTTI`, which applies `-fno-rtti` if `ON`.
2. Configure CI job which would check if Valhalla can be built with `DISABLE_RTTI`.
cc @valhalla/core
Contributor guide
Assessment
This issue has not been assessed yet.