Skip to content
Permalink
Browse files

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>
  • Loading branch information
rkitover committed Aug 19, 2019
1 parent fc2eb38 commit f5eabb351436ac433f5c57d2d836740216e54185
Showing with 9 additions and 2 deletions.
  1. +9 −2 tools/builder/core.sh
@@ -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

0 comments on commit f5eabb3

Please sign in to comment.
You can’t perform that action at this time.