#
7945435f |
| 26-Aug-2024 |
Shoaib Meenai <smeenai@fb.com> |
[clang] Add support for omitting only global destructors (#104899)
For mobile applications, it's common for global destructors to never be
called (because the applications have their own lifecycle
[clang] Add support for omitting only global destructors (#104899)
For mobile applications, it's common for global destructors to never be
called (because the applications have their own lifecycle independent of
the standard C runtime), but threads are created and destroyed as normal
and so thread-local destructors are still called. -fno-static-c++-destructors
omits unnecessary global destructors, which is useful for code size, but
it also omits thread-local destructors, which is unsuitable. Add a
ternary `-fc++-static-destructors={all,none,thread-local}` option
instead to allow omitting only global destructors.
show more ...
|