Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use apple-m1 as the base mcpu for aarch64-apple-darwin #44347

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

staticfloat
Copy link
Sponsor Member

Since the Apple devkits are all presumably returned to Apple at this
point, it doesn't make sense to continue to build for the earlier a12
model, we should just build for the M1 explicitly. LLVM supports
-mcpu=apple-m1 since LLVM 13.0.0-rc1 [0]. Clang 13 (ships with
Xcode 13) understands this, so it's a safe bet that this can be used
with the C compiler that is generating this code as well.

[0]
llvm/llvm-project@a8a3a43

Since the Apple devkits are all presumably returned to Apple at this
point, it doesn't make sense to continue to build for the earlier a12
model, we should just build for the M1 explicitly.  LLVM supports
`-mcpu=apple-m1` since LLVM 13.0.0-rc1 [0].  Clang 13 (ships with
Xcode 13) understands this, so it's a safe bet that this can be used
with the C compiler that is generating this code as well.

[0]
llvm/llvm-project@a8a3a43
@staticfloat staticfloat added domain:building Build system, or building Julia or its dependencies system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips labels Feb 25, 2022
@gbaraldi
Copy link
Member

LGTM

@staticfloat staticfloat changed the title Use apple-m1 as the base march for aarch64-apple-darwin Use apple-m1 as the base mcpu for aarch64-apple-darwin Feb 25, 2022
@giordano
Copy link
Contributor

LLVM supports
-mcpu=apple-m1 since LLVM 13.0.0-rc1 [0]. Clang 13 (ships with
Xcode 13) understands this

I think you're mixing up vanilla LLVM with Apple Clang. Xcode up to 13.2.1 ships Apple Clang 13 which is based on upstream LLVM 12 (ref: https://en.wikipedia.org/wiki/Xcode#Xcode_11.x_-_13.x_(since_SwiftUI_framework)_2), but it's true that XCode 13.0+ (with at least version string clang-1300.0.29.3) understands -mcpu=apple-m1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants