Commit f069f0c0 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

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.)
parent 75ef0aa2
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment