[BUG]: -flto=thin from CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG is not respected #5088
Open
2 of 3 tasks
Labels
triage
New bug, unverified
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
f33f6af
Problem description
I want to enable lto in Release mode only. I added
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
in myCMakeLists.txt
.Since I didn't set
CMAKE_INTERPROCEDURAL_OPTIMIZATION
, linepybind11/tools/pybind11Common.cmake
Line 397 in f33f6af
-flto=thin
and add-flto
. So when building in Release mode, I have :-flto=thin -flto
.I bypass the problem by setting
THIN_LTO
inpybind11_add_module
.Reproducible example code
No response
Is this a regression? Put the last known working version here if it is.
Not a regression
The text was updated successfully, but these errors were encountered: