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 target CPU for aarch64-apple-darwin. #109899

Merged
merged 1 commit into from
May 25, 2023

Conversation

daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Apr 3, 2023

This updates the target CPU for the aarch64-apple-darwin target to apple-m1, which is the first generation of CPUs with this target anyway.

This wasn't able to be done before because of the minimum supported version of LLVM being 12, now that it was updated to 13 (in fact we are already at 14), this is available.

See previous update: #90478.
See LLVM update: #100460.

@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 3, 2023
@cuviper
Copy link
Member

cuviper commented Apr 7, 2023

FWIW, the minimum is now LLVM 14: #107573

@apiraino
Copy link
Contributor

apiraino commented May 3, 2023

r? compiler

@rustbot rustbot assigned jackh726 and unassigned TaKO8Ki May 3, 2023
@wesleywiser
Copy link
Member

@rustbot ping macos

What do you all think about changing aarch64-apple-darwin to use the apple-m1 as the target CPU by default instead of apple-a14?

@rustbot rustbot added the O-macos Operating system: macOS label May 18, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 18, 2023

Hey MacOS Group! This issue or PR could use some MacOS-specific guidance. Could one
of you weigh in? Thanks <3

cc @hkratz @inflation @nvzqz @shepmaster @thomcc

@thomcc
Copy link
Member

thomcc commented May 18, 2023

Hmm, weren't there dev kits where this was not the case? I'm not sure we care about that, though.

@thomcc
Copy link
Member

thomcc commented May 18, 2023

Ah, apparently the devkits used https://en.wikipedia.org/wiki/Apple_A12X, so A14 wouldn't work on them anyway. I'm not opposed then (not that I think dev kits are a reason to stop this change -- They can always use -Ctarget-cpu=native)

@cuviper
Copy link
Member

cuviper commented May 18, 2023

(-Ctarget-cpu=native doesn't help if the toolchain was already built to a level you can't run.)

@thomcc
Copy link
Member

thomcc commented May 18, 2023

Ah, well, you'll need -Zbuild-std too, or to build a fresh toolchain.

@nvzqz
Copy link
Contributor

nvzqz commented May 18, 2023

@thomcc the M1 devkits needed to be returned to Apple. So we can assume they aren't being used in the wild.

@thomcc
Copy link
Member

thomcc commented May 18, 2023

What does clang use for this? I think we usually try to align with them, which (I've heard) simplifies cross-lang LTO.

@nikic
Copy link
Contributor

nikic commented May 18, 2023

What does clang use for this? I think we usually try to align with them, which (I've heard) simplifies cross-lang LTO.

It also uses apple-m1: https://github.com/llvm/llvm-project/blob/0e85260db1cfd4e8688d917a09a212c2d9a343f3/clang/lib/Driver/ToolChains/Arch/AArch64.cpp#L50-L54

@thomcc
Copy link
Member

thomcc commented May 18, 2023

It's hard to argue against switching in that case. Sounds good to me.

@jackh726
Copy link
Member

Seems like from the comments this is appropriate

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 25, 2023

📌 Commit 0f90aed has been approved by jackh726

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 25, 2023
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#95198 (Add slice::{split_,}{first,last}_chunk{,_mut})
 - rust-lang#109899 (Use apple-m1 as target CPU for aarch64-apple-darwin.)
 - rust-lang#111624 (Emit diagnostic for privately uninhabited uncovered witnesses.)
 - rust-lang#111875 (Don't leak the function that is called on drop)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 87bb7d8 into rust-lang:master May 25, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-macos Operating system: macOS S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.