3 ms·
-fno-exceptions only prevents you from calling throw. If you don't want overhead likely you want -fno-asynchronous-unwind-tables + that clang flag that specifie
by jcelerier 2y ago
-fno-exceptions only prevents you from calling throw. If you don't want overhead likely you want -fno-asynchronous-unwind-tables + that clang flag that specifies that extern "C" functions don't throw
- rockwotj 2y agoLooking how the docs for https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fasynchronous-unwind-tables https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#ind... How does that affect code generation? It reads as only effecting debug information and binary size to my untrained eyes.
- rockwotj 2y agoAnd based on a few clang discourse threads, it only removes .eh_frame I think this only effects binary size, which I understand smaller binaries can load faster but not being able to get stacktraces for debuggers and profilers seems like a loss
- flohofwoe 2y agoI'm pretty sure I could see a roughly 10% binary size decrease in my C++ projcts just by setting -fno-exceptions, and that was for C++ code that didn't use exceptions in the first place, so there must be more to it then just forbidding throw. Last time I tinkered with this stuff was around 2017 though.