builder: disable LTO on 64 bit mingw

LTO on 64 bit mingw still produces segfaulting binaries.

Turn off LTO for just that platform and leave it enabled for all other
platforms.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-08-19 17:23:45 -04:00
parent fc2eb38fcd
commit f5eabb3514
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 9 additions and 2 deletions

View File

@ -2611,6 +2611,7 @@ build_project() {
puts "${NL}Building project: $CHECKOUT${NL}${NL}"
target_os=${CROSS_OS:-$os}
target_bits=${target_bits:-$bits}
dist_pre_build project
@ -2619,8 +2620,14 @@ build_project() {
rm -f visualboyadvance-m.exe
# FIXME: turn LTO back on when everything works
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=ON $CMAKE_BASE_ARGS $PROJECT_ARGS $@
lto=ON
# FIXME: LTO still broken on 64 bit mingw
if [ "$target_os" = windows ] && [ "$target_bits" = 64 ]; then
lto=OFF
fi
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=${lto} $CMAKE_BASE_ARGS $PROJECT_ARGS $@
echo_run make -j$NUM_CPUS VERBOSE=1
if [ "$target_os" = mac ]; then