-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
Move Win32 defines to configure.ac to ensure they are globally defined #15704
Conversation
I think this needs analogous MSVC build system changes. |
033ddef
to
e38c194
Compare
Fixed |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
tACK e38c194 with msvc x64. (haven't tested the mingw build) |
FWIW: I've verified that a disassembly of the |
@luke-jr Needs rebase |
e38c194
to
8c5535f
Compare
Rebased |
Concept ACK |
8c5535f
to
072a5e4
Compare
Rebased (macOS native Travis failing is "normal" now, right?) |
Open-Close to re-run ci. See #15847 (comment) |
Gitian builds
|
common.vcxproj used for MSVC builds
Rebased |
072a5e4
to
1ccb9f3
Compare
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 1ccb9f3 - checked that the binaries produced are the same.
If anyone wants to read into the origins/effects of these definitions, here are a couple articles:
Where did WIN32_LEAN_AND_MEAN come from?
What's the difference between WINVER, _WIN32_WINNT, _WIN32_WINDOWS, and _WIN32_IE?.
While reviewing I did check the time & lines saved in preprocessing by passing WIN32_LEAN_AND_MEAN
. i.e:
#include <windows.h>
int main() {
return 0;
}
# x86_64-w64-mingw32-g++ (GCC) 10-win32 20200525
# mingw-w64 7.0.0
time x86_64-w64-mingw32-g++ -E test.cpp | wc -l
80856 lines
avg time of 0.40s
time x86_64-w64-mingw32-g++ -E test.cpp -DWIN32_LEAN_AND_MEAN
54995 lines
avg time of 0.13s
# also checked with more of our defines
time x86_64-w64-mingw32-g++ -E test.cpp -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN -D_MT -DWIN32 -D_WINDOWS -D_FILE_OFFSET_BITS=64 | wc -l
56884 lines
avg time ~ the same as -DWIN32_LEAN_AND_MEAN
I might follow up with some documentation additions to configure.ac
.
…y are globally defined 1ccb9f3 Move Win32 defines to configure.ac to ensure they are globally defined (Luke Dashjr) Pull request description: bitcoin#9245 no longer needs this, since the main `_WIN32_WINNT` got bumped by something else. So rather than just lose it, might as well get it merged in independently. I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere. ACKs for top commit: fanquake: ACK 1ccb9f3 - checked that the binaries produced are the same. Tree-SHA512: 273e9186579197be01b443b6968e26b9a8031d356fabc5b73aa967fcdb837df195b7ce0fc4e4529c85d9b86da6f2d7ff1bf56a3ff0cbbcd8cee8a9c2bf70a244
Summary: ``` [...] I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere. ``` Backport of core [[bitcoin/bitcoin#15704 | PR15704]]. Depends on D7741. Test Plan: ``` cmake -GNinja .. \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake \ -DBUILD_BITCOIN_SEEDER=OFF ninja ``` Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7742
#9245 no longer needs this, since the main
_WIN32_WINNT
got bumped by something else.So rather than just lose it, might as well get it merged in independently.
I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere.