Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2025, windows-2022]
os: [windows-2025, windows-2022, windows-11-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
Expand All @@ -41,4 +41,6 @@ jobs:
# CB_CMAKE_BUILD_TYPE: Release
CB_CMAKE_BUILD_TYPE: RelWithDebInfo
CB_NUMBER_OF_JOBS: 2
# No OpenSSL ASM exists for Window-11=arm.
CB_OPENSSL_NO_ASM: ${{ matrix.os == 'windows-11-arm' && '1' || '' }}
run: ruby ./bin/build-tests.rb
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ if(WIN32)
message(STATUS "Windows SDK: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
endif()

# This disables Microsoft’s C++ overloads for _Interlocked* and fixes the ARM64 build.
if (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
message(STATUS "Applying WinBase Interlocked macro for Windows ARM64")
add_compile_definitions(MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS=0)
endif()

include(cmake/TarballRelease.cmake OPTIONAL)

include(cmake/PreventInSourceBuilds.cmake)
Expand Down
5 changes: 5 additions & 0 deletions bin/build-tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ def run(*args)
CB_CMAKE_EXTRAS << "-DENABLE_SANITIZER_MEMORY=ON"
end

# No OpenSSLASM exists for Window ARM64
if ENV["CB_OPENSSL_NO_ASM"] == "1"
CB_CMAKE_EXTRAS << "-DOPENSSL_NO_ASM=1"
end

BUILD_DIR = if CB_SANITIZER.empty?
File.join(PROJECT_ROOT, "cmake-build-tests")
else
Expand Down
2 changes: 1 addition & 1 deletion core/platform/random.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <mutex>
#include <system_error>

#ifdef WIN32
#ifdef _WIN32
// We need to include windows.h _before_ wincrypt.h
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
Expand Down
Loading