Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: -flto=thin from CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG is not respected #5088

Open
2 of 3 tasks
bansan85 opened this issue Apr 3, 2024 · 0 comments
Open
2 of 3 tasks
Labels
triage New bug, unverified

Comments

@bansan85
Copy link

bansan85 commented Apr 3, 2024

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 my CMakeLists.txt.

Since I didn't set CMAKE_INTERPROCEDURAL_OPTIMIZATION, line

if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
think I didn't already enabled -flto=thin and add -flto. So when building in Release mode, I have : -flto=thin -flto.

I bypass the problem by setting THIN_LTO in pybind11_add_module.

Reproducible example code

No response

Is this a regression? Put the last known working version here if it is.

Not a regression

@bansan85 bansan85 added the triage New bug, unverified label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New bug, unverified
Projects
None yet
Development

No branches or pull requests

1 participant