AMIGAOS: Use LTO, -O3 and dead code elimination by default (#4238)

This commit is contained in:
Hubert Maier 2022-09-10 18:26:31 +02:00 committed by GitHub
parent 94a79bfeb3
commit 63b709be99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
configure vendored
View File

@ -2579,9 +2579,9 @@ case $_host_os in
_port_mk="backends/platform/sdl/amigaos/amigaos.mk"
add_line_to_config_mk 'AMIGAOS = 1'
append_var CXXFLAGS "-mlongcall"
# Enable optimizations for non-debug builds
# Enable full optimizations for non-debug builds
if test "$_debug_build" = no; then
_optimization_level=-O2
_optimization_level=-O3
else
_optimization_level=-O0
append_var CXXFLAGS "-fno-omit-frame-pointer"
@ -6200,6 +6200,15 @@ case $_host_os in
append_var LDFLAGS "-Wl,--no-gc-sections"
fi
;;
amigaos*)
# In release mode use LTO to improve performance
# and dead code elimination to reduce binary size
if test "$_release_build" = yes; then
append_var CXXFLAGS "-flto"
append_var CXXFLAGS "-ffunction-sections -fdata-sections"
append_var PLUGIN_LDFLAGS "-flto=jobserver"
fi
;;
android)
# Force treating unqualified char variables as signed by default.
# NDK compiler for ARM will treat them as unsigned otherwise, which creates bugs in the code.