Skip to content

Commit bde16f1

Browse files
committed
fix: drop lto on MinGW
1 parent 5fc3f6a commit bde16f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/pybind11Common.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ function(_pybind11_return_if_cxx_and_linker_flags_work result cxxflags linkerfla
302302
endfunction()
303303

304304
function(_pybind11_generate_lto target prefer_thin_lto)
305+
if(MINGW)
306+
message(STATUS "${target} disabled (problems with undefined symbols for MinGW for now)")
307+
return()
308+
endif()
309+
305310
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
306311
set(cxx_append "")
307312
set(linker_append "")

0 commit comments

Comments
 (0)