Skip to content

fix: build Universal Binary for Intel CPU support#9

Merged
momenbasel merged 1 commit intomainfrom
fix/intel-cpu-support
Apr 10, 2026
Merged

fix: build Universal Binary for Intel CPU support#9
momenbasel merged 1 commit intomainfrom
fix/intel-cpu-support

Conversation

@momenbasel
Copy link
Copy Markdown
Owner

Summary

  • Added ARCHS: "arm64 x86_64" to project.yml build settings
  • Updated CI workflow to pass ARCHS="arm64 x86_64" to xcodebuild
  • This produces a Universal Binary that runs natively on both Intel and Apple Silicon Macs

Root Cause

The project had no explicit ARCHS setting, so Xcode defaulted to building only for the host architecture (arm64 on Apple Silicon). Intel Mac users got an incompatible binary.

Closes #7

The project was only building for arm64 (Apple Silicon), making it
unusable on Intel Macs. Add ARCHS="arm64 x86_64" to both project.yml
and the CI workflow to produce a Universal Binary.

Closes #7
Copilot AI review requested due to automatic review settings April 10, 2026 19:22
@momenbasel momenbasel merged commit 1fe0a01 into main Apr 10, 2026
3 checks passed
@momenbasel momenbasel deleted the fix/intel-cpu-support branch April 10, 2026 19:22
Copy link
Copy Markdown

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 ensures the macOS app builds as a Universal Binary so it runs natively on both Intel (x86_64) and Apple Silicon (arm64) Macs, addressing Intel incompatibility reported in #7.

Changes:

  • Added an explicit ARCHS: "arm64 x86_64" build setting in project.yml.
  • Updated the GitHub Actions workflow build step to invoke xcodebuild with ARCHS="arm64 x86_64".

Reviewed changes

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

File Description
project.yml Sets project-wide architectures to produce a universal macOS build.
.github/workflows/build.yml Forces universal-arch build in CI via xcodebuild arguments.

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

Comment on lines 12 to 16
SWIFT_VERSION: "5.9"
MACOSX_DEPLOYMENT_TARGET: "13.0"
ARCHS: "arm64 x86_64"
CODE_SIGN_IDENTITY: "-"
CODE_SIGN_STYLE: "Automatic"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Setting ARCHS at the global settings.base level applies to all configurations (including Debug), which can significantly slow local dev builds by always producing a universal binary. Consider scoping this to Release (or using XcodeGen per-config settings) so Debug can keep the default/active-arch behavior while Release produces the universal app.

Copilot uses AI. Check for mistakes.
Comment on lines 23 to 30
xcodebuild -project PureMac.xcodeproj \
-scheme PureMac \
-configuration Release \
-derivedDataPath build \
build \
ARCHS="arm64 x86_64" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

ARCHS is now set in project.yml, and the workflow also forces ARCHS on the command line. This duplication can drift over time; consider relying on the project setting (or alternatively removing it from project.yml and keeping CI as the single source of truth).

Copilot uses AI. Check for mistakes.
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.

[Bug] inter cpu 无法使用

2 participants