Repository navigation
integrate with CMake's LTO support - #143
Merged
Merged
Conversation
This commit prepares the project for using CMake's LTO support. (Using `-flto` made sense in 2015, since CMake support for LTO with GCC and Clang was added in version 3.9.0 in 2017. [1]) Specifying `-flto` seems to cause build failures on Ubuntu xenial. [2] [1]: https://cmake.org/cmake/help/v3.9/release/3.9.html [2]: PJK#140 Fixes: 8e75783
Contributor
Author
|
Hindsight being 20/20, it might make sense to log when LTO was disabled b/c CMake was too old. Additionally, do you think it's worth trying to enable LTO on versions earlier than 3.9.0, even though the CMake-supported way only works with the Intel compiler on Linux? |
Owner
|
Thanks @xanderlent! |
Owner
|
Re pre 3.9: I wouldn't worry about supporting >2 years of old build deps, if anyone cares, they can always add extra flags during build configuration or come and complain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #140 for the context of this PR.
This definitely fixes the build failure on Ubuntu xenial.
Please do not merge until I can confirm that this approach actually enables LTO with newer versions of CMake. I haven't been able to confirm that LTO is being used.