-
Notifications
You must be signed in to change notification settings - Fork 5
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
cmake: Add LTO functionality #52
Conversation
6174485
to
4291baa
Compare
3397612
to
bcf586f
Compare
Rebased. |
Repeating my comments from bitcoin#28876. I'm not a fan of this interface. If we are going to have a dedicated LTO option, it shouldn't also require manually passing flags into non-standard variables. It's also not clear to me why:
is any better than just:
In this branch, is |
and
have the common drawback, which is no support for C code. That means that all object files in the
Happy to hear other interface ideas / prototypes :) |
Right. So we've still got to use LDFLAGS to pass through normal LTO link options, with your current approach? So why not just keep using the other standard *FLAGS vars? Otherwise now we've also got to mix and match. What are the default CMake LTO flags? Why are they better? Are they stable (not changing from release to release)?
Why wouldn't it support C code; that's what CFLAGS is for? I only omitted it here to simplify examples. |
For GCC:
with the main benefit of parallelizing of LTRANS jobs, which in turn means:
For Clang:
with benefits as follows:
No, they are not. If I understand your point correctly, this PR could be closed and all needed LTO flags are to be provided via standard variables, right? |
I think the PR should stay open for further discussion/other ideas, but yes, my main point is that we shouldn't be creating a special interface, for a subset of optimisation flags, without a good reason too. Especially if it might still requires you to use standard env vars anyways. |
399642a
to
ecf10f1
Compare
bcf586f
to
83f7a42
Compare
Rebased. |
ecf10f1
to
2af94fb
Compare
83f7a42
to
9736ca2
Compare
Rebased. |
Co-authored-by: Cory Fields <[email protected]> Co-authored-by: Vasil Dimov <[email protected]>
Co-authored-by: Cory Fields <[email protected]>
Keep this commit at the top when rebasing.
d2e741e
to
1958b54
Compare
9736ca2
to
5c4f2e8
Compare
Marking this PR as a draft in the light of the bitcoin#29185. |
67ceebb
to
203a3ab
Compare
Closing. See bitcoin#29185. |
The
LTO_FLAGS
CMake variable might be used to override CMake's default LTO flags.The following build system configuration:
is comparable with the master branch amended with bitcoin#28876.