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

feat(cmake): only define lto if CMAKE's IPO setting is unset #4643

Merged
merged 1 commit into from
Apr 29, 2023

Conversation

henryiii
Copy link
Collaborator

Description

This triggers a bunch of compile checks you are probably already doing (via CheckIPOSupported), so let's use the same mechanism we use for pybind11_add_module and skip if the global variable is set when importing pybind11.

Suggested changelog entry:

* Skip lto checks and target generation when `CMAKE_INTERPROCEDURAL_OPTIMIZATION` is defined.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii changed the title fix(cmake): only define lto if CMAKE's IPO setting is unset feat(cmake): only define lto if CMAKE's IPO setting is unset Apr 29, 2023
@henryiii henryiii merged commit 956390a into pybind:master Apr 29, 2023
@henryiii henryiii deleted the henryiii/fix/emscripten2 branch April 29, 2023 14:15
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Apr 29, 2023
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants