Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/pybind11Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@ function(_pybind11_generate_lto target prefer_thin_lto)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE)
# Clang Gold plugin does not support -Os; append -O3 to MinSizeRel builds to override it
set(linker_append ";$<$<CONFIG:MinSizeRel>:-O3>")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT MINGW)
elseif(
CMAKE_CXX_COMPILER_ID MATCHES "GNU"
AND NOT MINGW
AND NOT APPLE)
# GCC on macOS has no linker plugin, which -fno-fat-lto-objects requires
set(cxx_append ";-fno-fat-lto-objects")
endif()

Expand Down
Loading