Skip to content

Commit 35b898c

Browse files
committed
release: target Windows 10 or later
While we will only outwardly support Windows 10+, due to an issue in mingw-w64, we can't set the *-subsystem-version values higher than to target Windows 8, so do that as a best effort.
1 parent 398754e commit 35b898c

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ if(WIN32)
253253
]=]
254254

255255
target_compile_definitions(core_interface INTERFACE
256-
_WIN32_WINNT=0x0601
257-
_WIN32_IE=0x0501
256+
_WIN32_WINNT=0x0A00
257+
_WIN32_IE=0x0A00
258258
WIN32_LEAN_AND_MEAN
259259
NOMINMAX
260260
)
@@ -292,9 +292,11 @@ if(WIN32)
292292
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
293293
try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK)
294294
try_append_linker_flag("-static" TARGET core_interface)
295-
# We require Windows 7 (NT 6.1) or later.
295+
# We support Windows 10+, however it's not possible to set these values accordingly,
296+
# due to a bug in mingw-w64. See https://sourceforge.net/p/mingw-w64/bugs/968/.
297+
# As a best effort, target Windows 8.
296298
try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface)
297-
try_append_linker_flag("-Wl,--minor-subsystem-version,1" TARGET core_interface)
299+
try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface)
298300
endif()
299301
endif()
300302

contrib/devtools/symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def check_PE_libraries(binary) -> bool:
260260
def check_PE_subsystem_version(binary) -> bool:
261261
major: int = binary.optional_header.major_subsystem_version
262262
minor: int = binary.optional_header.minor_subsystem_version
263-
if major == 6 and minor == 1:
263+
if major == 6 and minor == 2:
264264
return True
265265
return False
266266

contrib/devtools/test-symbol-check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_PE(self):
135135
}
136136
''')
137137

138-
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
138+
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
139139
(1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' +
140140
executable + ': failed DYNAMIC_LIBRARIES'))
141141

@@ -166,7 +166,7 @@ def test_PE(self):
166166
}
167167
''')
168168

169-
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
169+
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
170170
(0, ''))
171171

172172

doc/release-notes-empty-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ codesign -s - bitcoin-cli bitcoin-qt bitcoin-tx bitcoin-util bitcoin-wallet bitc
4242
Compatibility
4343
==============
4444

45-
Bitcoin Core is supported and extensively tested on operating systems
46-
using the Linux Kernel 3.17+, macOS 13.0+, and Windows 7 and newer. Bitcoin
45+
Bitcoin Core is supported and tested on operating systems using the
46+
Linux Kernel 3.17+, macOS 13.0+, and Windows 10 and newer. Bitcoin
4747
Core should also work on most other Unix-like systems but is not as
4848
frequently tested on them. It is not recommended to use Bitcoin Core on
4949
unsupported systems.

0 commit comments

Comments
 (0)