Skip to content

Fix ARM64 cross-compilation on x64 hosts#1252

Open
gugavaro wants to merge 1 commit intomainfrom
users/gustavovaro/cherry-pick-arm64-fix
Open

Fix ARM64 cross-compilation on x64 hosts#1252
gugavaro wants to merge 1 commit intomainfrom
users/gustavovaro/cherry-pick-arm64-fix

Conversation

@gugavaro
Copy link
Copy Markdown
Collaborator

@gugavaro gugavaro commented Apr 3, 2026

When cross-compiling for ARM64 on an x64 host, CMAKE_SYSTEM_PROCESSOR (AMD64) matches the x64 condition before reaching ARM64, causing MI_ARCH to be set to x64 instead of arm64. This results in the wrong redirect lib being linked.

Fix: Add AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL ARM64 to the x64 detection so ARM64 builds correctly fall through to the arm64 condition.

Cherry-picked from the dev branch (PR #1244).

When cross-compiling for ARM64 on an x64 host, CMAKE_SYSTEM_PROCESSOR
(AMD64) was matching the x64 condition before reaching ARM64, causing
the wrong redirect lib to be linked.

Add 'AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL ARM64' to the x64
detection to let ARM64 builds fall through to the correct condition.

Cherry-picked from dev branch (PR #1244).
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