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

Add a cmake option ENABLE_LTO for link time optimization on Release b… #713

Merged
merged 1 commit into from Sep 21, 2020

Conversation

phkahler
Copy link
Member

…uilds.

LTO builds take significantly longer but produce smaller executables with better performance.

@phkahler phkahler linked an issue Sep 21, 2020 that may be closed by this pull request
@whitequark
Copy link
Contributor

I think the condition isn't useful; for example it prevents RelWithDebInfo builds from using LTO.

@phkahler
Copy link
Member Author

@whitequark what would be better? When developing I prefer release builds, but LTO takes several minutes longer. I don't think we want it for CI builds.

@whitequark
Copy link
Contributor

Just have no condition? When developing you should use two build trees to avoid spurious rebuilds, anyway.

@phkahler
Copy link
Member Author

Just have no condition? When developing you should use two build trees to avoid spurious rebuilds, anyway.

Do you really want it for CI? we already take too long there sometimes. Also, what would two build trees get me?

@whitequark
Copy link
Contributor

Do you really want it for CI? we already take too long there sometimes.

Well, you're adding an option, not unconditionally enabling LTO builds. On CI (and presumably by default) the option would be off.

@phkahler
Copy link
Member Author

Got it, you meant just the inner condition. Done.

@phkahler phkahler merged commit d575da8 into solvespace:master Sep 21, 2020
@phkahler phkahler deleted the lto branch September 24, 2020 14:34
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.

Compile with LTO (suggestion)
3 participants