valhalla / valhalla/valhalla

Add CMake option to build Valhalla with `-fno-rtti`

Open
#3,228 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.