-
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 user-defined APPEND_{CPP,C,CXX,LD}FLAGS
(take 2)
#184
Conversation
063d2f1
to
b567a38
Compare
Context please! Please compare/contrast the approaches at a high-level. Keep in mind that while you're holding this all in your head, it's a lot for the reviewers to keep up with as it's constantly changing. |
The former approach in #157 works at a target properties (a CMake abstraction) level. It fails in certain cases:
This approach works at a lower level. Flags are appended directly to the compiler/linker invocation strings, after processing all higher level abstractions. Please refer to CMake docs for the used variables: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b567a38
This works as well and the flags appear really and the end:
/usr/bin/c++ ... -MD -MT src/CMakeFiles/bitcoin_node.dir/net.cpp.o -MF src/CMakeFiles/bitcoin_node.dir/net.cpp.o.d -o src/CMakeFiles/bitcoin_node.dir/net.cpp.o -c src/net.cpp -I/appendcppflags -I/appendcxxflags
/usr/bin/c++ ... src/CMakeFiles/bitcoind.dir/bitcoind.cpp.o src/CMakeFiles/bitcoind.dir/init/bitcoind.cpp.o -o src/bitcoind ... /usr/local/lib/libsqlite3.so -L/appendldflags
b567a38
to
2d94797
Compare
Rebased. |
The content of those variables is appended to the each target flags added by the build system.
2d94797
to
bfadb6e
Compare
Rebased to resolve a conflict with the merged #173. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK bfadb6e
Is it intended that depends will be updated to use these? |
Doing a depends build with |
The configure summary is to be reworked in #93. |
No, at this moment. Should it be? |
I just mean generally. I'm unsure how to test this as:
That said, using VERBOSE=1, lto does seem to be working as intended. |
APPEND_{CPP,C,CXX,LD}FLAGS
-- an alternativeAPPEND_{CPP,C,CXX,LD}FLAGS
(take 2)
To observe raw build logs using the
I've added a commit for that. |
During the recent call, @theuni requested a CI stuff based on this PR. Please consider bitcoin#29790. |
Cross posting from bitcoin#29790 (comment):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a9dc2c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
As it was requested during the call yesterday, I've updated the CI demo branch in bitcoin#29790 to use |
Considering that we agreed on using |
An alternative implementation of #157.