Skip to content

FIX: Universal builds on Apple with LLVM Clang#2094

Open
philippremy wants to merge 1 commit into
uxlfoundation:masterfrom
philippremy:bits/apple-universal-llvmclang
Open

FIX: Universal builds on Apple with LLVM Clang#2094
philippremy wants to merge 1 commit into
uxlfoundation:masterfrom
philippremy:bits/apple-universal-llvmclang

Conversation

@philippremy
Copy link
Copy Markdown

Description

Currently, when building a universal binary on Apple platforms with a supported compiler other than AppleClang (i.e., any other LLVM-derived Clang) this will cause the same error as in issue #1772.

This provides a small fix which checks if (1) architectures are cross-compiled on Apple or (2) a universal binary is compiled on Apple. Fall back to the regular CMAKE_SYSTEM_PROCESSOR for non-Apple targets, which used to be the default behavior. Essentially mimicks the AppleClang detection.

Partly fixes #1772 (should already be fixed for AppleClang).

Type of change

  • bug fix and infrastructure - Fixes compilation error on LLVM Clang when compiling universal binaries

Tests

  • not needed

Documentation

  • not needed

Breaks backward compatibility

  • No

Currently, when building a universal binary on Apple platforms with a
supported compiler other than AppleClang (i.e., any other LLVM-derived
Clang) will cause the same error as in issue uxlfoundation#1772.

This provides a small fix which checks if (1) architectures are
cross-compiled on Apple or (2) a universal binary is compiled on Apple.
Fall back to the regular CMAKE_SYSTEM_PROCESSOR for non-Apple targets,
which used to be the default behavior.

Signed-off-by: Philipp Remy <philipp@philippremy.net>
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.

CMake build fails when building a universal binary on MacOS

1 participant