Skip to content

Conversation

@statham-arm
Copy link
Collaborator

Those two variants have -fno-exceptions -fno-rtti in the configuration file that specifies options for building the library. None of the other library variants is built with this flags, not even the other variants intended for use in applications without exceptions and RTTI.

If you try to build libc++abi with those flags, it fails to build, because private_typeinfo.cpp is unconditionally included in the library and unconditionally uses dynamic_cast.

(And I assume that it's OK to use dynamic_cast in that part of libc++abi if the application will never use RTTI, because then it won't include that object file in the first place.)

Those two variants have `-fno-exceptions -fno-rtti` in the
configuration file that specifies options for building the library.
None of the other library variants is built with this flags, not even
the other variants intended for use in _applications_ without
exceptions and RTTI.

If you try to build libc++abi with those flags, it fails to build,
because `private_typeinfo.cpp` is unconditionally included in the
library and unconditionally uses `dynamic_cast`.

(And I assume that it's OK to use `dynamic_cast` in that part of
libc++abi if the application will never use RTTI, because then it
won't include that object file in the first place.)
@statham-arm statham-arm merged commit 8139c96 into ARM-software:main Dec 9, 2024
1 check passed
@statham-arm statham-arm deleted the rtti-build-fix branch December 9, 2024 13:58
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.

2 participants