Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Oct 27, 2025

This patch introduces a unified mechanism for configuring whether exceptions and RTTI are enabled across the runtimes. It does that by introducing new options named RUNTIMES_ENABLE_{EXCEPTIONS,RTTI} and providing a CMake interface target that can be used by various runtime targets (cxx_shared, cxx_static, etc) to get the relevant flags.

This patch aims to create a precedent and an example that can be followed to unify other similar configuration options across the runtimes.

There are still the following open questions:

  • Does it make sense at all to have a unified option for all the runtimes? For example, is it desirable to be able to build libc++ without exception support, but libc++abi with exception support?
  • How should we deal with options where one of the runtimes does not allow configuring an option? For example, libunwind currently doesn't allow configuring whether exceptions are enabled: they are always enabled. If libunwind links against the interface target for language-level flags and RUNTIMES_ENABLE_EXCEPTIONS=OFF is used, that won't work.
  • Where should we document these new unified options? Should we create a documentation page for all of the runtimes?

This patch introduces a unified mechanism for configuring whether
exceptions and RTTI are enabled across the runtimes. It does that
by introducing new options named RUNTIMES_ENABLE_{EXCEPTIONS,RTTI}
and providing a CMake interface target that can be used by various
runtime targets (cxx_shared, cxx_static, etc) to get the relevant
flags.

This patch aims to create a precedent and an example that can be
followed to unify other similar configuration options across the
runtimes.

There are still the following open questions:
- Does it make sense at all to have a unified option for all the
  runtimes? For example, is it desirable to be able to build libc++
  without exception support, but libc++abi with exception support?
- How should we deal with options where one of the runtimes does not
  allow configuring an option? For example, libunwind currently doesn't
  allow configuring whether exceptions are enabled: they are always
  enabled. If libunwind links against the interface target for
  language-level flags and RUNTIMES_ENABLE_EXCEPTIONS=OFF is used,
  that won't work.
- Where should we document these new unified options? Should we create
  a documentation page for all of the runtimes?
@ldionne ldionne requested a review from petrhosek October 27, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant