Use O3 + flto with all but msvc (#2696)
* use O3 with flto
* fix msvc builds
* back to minsizerel in msvc, baremetal and 3ds
* default to static in builds with flto
* use ubuntu 22.04 for linux amd64
* use gcc12 in ubuntu 22.04
* include ubuntu24.04 + gcc14 for linux amd64
* Update build.yml
* Update build.yml
* add required dep for ubuntu24.04
* Update build.yml
* try to force strict aliasing
* revert and try to get latest gcc14
* build with Os + flto to compare
* compile with O2 with flto to compare
* go back to O3+flto as is the faster option
* forgot to use release in android
* use macos13 as 12 is being deprecated
* more platforms
---------
Co-authored-by: Vadim Grigoruk <grigoruk@gmail.com>
authored by