-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add target docs for aarch64-apple-darwin (M1/M2 macs) #124134
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dd96e0b
Update platform-support.md
TimTheBig 15019cb
Create aarch64-apple-darwin.md
TimTheBig 5742520
Update aarch64-apple-darwin.md
TimTheBig 0800f75
Update aarch64-apple-darwin.md
TimTheBig c174e12
Update aarch64-apple-darwin.md
TimTheBig 61a5eed
Update aarch64-apple-darwin.md
TimTheBig dc2a677
Update src/doc/rustc/src/platform-support/aarch64-apple-darwin.md
TimTheBig 124eeae
Update aarch64-apple-darwin.md
TimTheBig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/doc/rustc/src/platform-support/aarch64-apple-darwin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# `aarch64-apple-darwin` | ||
|
||
**Tier: 2 with host tools** | ||
|
||
64-bit Arm-based Apple devices running macOS: Macs with M1-family or later Apple Silicon CPUs. | ||
|
||
## Target maintainers | ||
|
||
- ??? | ||
|
||
## Requirements | ||
|
||
This target supports host tools and cross-compilation. It provides the full standard library including std and alloc. | ||
|
||
Binaries built for this target expect a Apple Silicon Mac on macOS 11.0 Big Sur+. | ||
|
||
### Format | ||
|
||
The default binary format is Mach-O, the executable format used on Apple's platforms. | ||
|
||
## Building the target | ||
|
||
Just add it to the `target` with: | ||
```sh | ||
rustup target add aarch64-apple-darwin | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
Rust ships pre-compiled artifacts for this target or build your own copy of `core` by using | ||
`build-std`. | ||
|
||
## Testing | ||
|
||
Binaries produced for this target can be run directly on Apple Silicon Macs natively. | ||
The Rust test suite can be run for this target on such hardware. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
This target supports C code. To build compatible C code, you should use a toolchain targeting aarch64-apple-darwin, such as Xcode on a Mac or GCC. | ||
The toolchain target triple matches this Rust target triple. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this section is supposed to be for building
rustc
such that it includes the target, not just for building code that uses the target. Although looking at the other documents it's kind of inconsistently used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command for building the target std is always the same, so I think this should be fine.