godot/platform
Rémi Verschelde 269b115d9c SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.

(cherry picked from commit 3907e53ff6)
2023-09-20 22:44:05 +02:00
..
android SCons: Disable C++ exception handling 2023-09-20 22:44:05 +02:00
ios SCons: Disable C++ exception handling 2023-09-20 22:44:05 +02:00
linuxbsd Allow unbundling OpenXR (for Linux distros) 2023-09-20 22:44:05 +02:00
macos [macOS] Workaround Xcode 15 linker bug. 2023-09-20 22:44:05 +02:00
uwp Change explicit 'Godot 4.0' references to 'Godot 4' 2023-07-10 18:09:58 +02:00
web SCons: Disable C++ exception handling 2023-09-20 22:44:05 +02:00
windows Build system: add option for MSVC incremental linking. 2023-09-20 22:44:04 +02:00
SCsub
register_platform_apis.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00