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.
This commit is contained in:
fanquake 2024-10-28 11:23:18 +00:00
parent 398754e70b
commit 35b898c47f
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1
4 changed files with 11 additions and 9 deletions

View file

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

View file

@ -260,7 +260,7 @@ def check_PE_libraries(binary) -> bool:
def check_PE_subsystem_version(binary) -> bool: def check_PE_subsystem_version(binary) -> bool:
major: int = binary.optional_header.major_subsystem_version major: int = binary.optional_header.major_subsystem_version
minor: int = binary.optional_header.minor_subsystem_version minor: int = binary.optional_header.minor_subsystem_version
if major == 6 and minor == 1: if major == 6 and minor == 2:
return True return True
return False return False

View file

@ -135,7 +135,7 @@ class TestSymbolChecks(unittest.TestCase):
} }
''') ''')
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
(1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' + (1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' +
executable + ': failed DYNAMIC_LIBRARIES')) executable + ': failed DYNAMIC_LIBRARIES'))
@ -166,7 +166,7 @@ class TestSymbolChecks(unittest.TestCase):
} }
''') ''')
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
(0, '')) (0, ''))

View file

@ -42,8 +42,8 @@ codesign -s - bitcoin-cli bitcoin-qt bitcoin-tx bitcoin-util bitcoin-wallet bitc
Compatibility Compatibility
============== ==============
Bitcoin Core is supported and extensively tested on operating systems Bitcoin Core is supported and tested on operating systems using the
using the Linux Kernel 3.17+, macOS 13.0+, and Windows 7 and newer. Bitcoin Linux Kernel 3.17+, macOS 13.0+, and Windows 10 and newer. Bitcoin
Core should also work on most other Unix-like systems but is not as Core should also work on most other Unix-like systems but is not as
frequently tested on them. It is not recommended to use Bitcoin Core on frequently tested on them. It is not recommended to use Bitcoin Core on
unsupported systems. unsupported systems.