Skip to content

Conversation

@faraasat
Copy link

@faraasat faraasat commented Dec 6, 2025

This fixes the build and compilation issues in Mac M1 onwards and for Arm Architecture as described in the issue #649 .

Copilot AI review requested due to automatic review settings December 6, 2025 11:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses compilation and build failures on Mac M1+ and ARM architectures by conditionally compiling x86-specific code and compiler flags only when targeting x86_64 platforms.

Key Changes:

  • Added architecture detection guards (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") to conditionally include x86-specific compiler flags (-mrdrnd, -mavx, AVX-512) and test sources
  • Updated intrinsics header to only include x86 intrinsic headers on x86 platforms
  • Added build/ directory to .gitignore

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/CMakeLists.txt Conditionally includes x86-specific test sources (m256.cpp, network_messages.cpp) and -mrdrnd flag only for x86_64 builds
src/CMakeLists.txt Splits Clang compiler options into x86-specific and generic branches, removing -mrdrnd and -target flags for non-x86 platforms
lib/platform_common/qintrin.h Guards x86 intrinsic header inclusion with preprocessor checks for x86 architectures
cmake/CompilerSetup.cmake Conditionally sets AVX/AVX-512 instruction flags and -mrdrnd test flag only for x86_64 architectures
.gitignore Adds build directory to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

faraasat and others added 2 commits December 13, 2025 12:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant