From f069f0c02d16532490450a7e29de5fe000e54898 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Fri, 22 Sep 2017 00:42:49 -0700 Subject: [PATCH] default LTO to OFF on 64 bit MinGW 64 bit MinGW (e.g. msys2 64 bit) produces a binary that immediately segfaults when built with LTO. Make ENABLE_LTO default to OFF on 64 bit MinGW (32 bit will still default to ON.) --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8509b13..a31c15bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,8 +79,8 @@ option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT}) SET(LTO_DEFAULT ON) -IF(WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) - # lto produces buggy binaries on gcc < 7 on win32 +IF(WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND AMD64) + # lto produces buggy binaries for 64 bit win32 SET(LTO_DEFAULT OFF) ENDIF()