Skip to content

Commit 957af0a

Browse files
committed
Disabling LTO under Cygw (and Mingw)
Due to the changes in: ``` Commit: 3d38ae4 [3d38ae4] Date: Monday, October 20, 2025 4:27:13 PM Feature/link-time-optimization ``` this gives the warnings: ``` /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ar: CMakeFiles/md5.dir/md5.c.o: plugin needed to handle lto object /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ranlib: ../../lib/libmd5.a(md5.c.o): plugin needed to handle lto object ``` redefining ranlib / ar / ... didn't work Disabling lto for the mentioned platforms.
1 parent 481e12d commit 957af0a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ option(enable_tracing "Enable tracing option in release builds [development]" O
3737
option(enable_lex_debug "Enable debugging info for lexical scanners in release builds [development]" OFF)
3838

3939
if(CMAKE_BUILD_TYPE STREQUAL "Release")
40-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
40+
if (CYGWIN OR MINGW)
41+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
42+
else()
43+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
44+
endif()
4145
endif()
4246

4347
include(CheckCXXCompilerFlag)

0 commit comments

Comments
 (0)