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

Add the aarch64-apple-darwin target #74541

Merged
merged 2 commits into from
Jul 23, 2020

Conversation

shepmaster
Copy link
Member

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.

@rust-highfive
Copy link
Collaborator

r? @varkor

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 20, 2020
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
target_c_int_width: "32".to_string(),
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
Copy link
Member Author

@shepmaster shepmaster Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was copied from LLVM.

llvm_target,
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
target_c_int_width: "32".to_string(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% cat size.c
#include <stdio.h>

int main() {
  printf("%zu\n", sizeof(int));
  return 0;
}

% cc size.c

% file a.out
a.out: Mach-O 64-bit executable arm64

% ./a.out
4

Copy link
Member

@jyn514 jyn514 Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also want printf("%zu %zu\n", sizeof(int*), sizeof(int (*)()));. Not that I expect it to be anything other than 8 bytes. Whoops, that was your next comment!

Ok(Target {
llvm_target,
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% cat size.c
#include <stdio.h>

int main() {
  printf("%zu\n", sizeof(void *));
  return 0;
}

% cc size.c

% file a.out
a.out: Mach-O 64-bit executable arm64

% ./a.out
8

base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]);
base.pre_link_args.insert(
LinkerFlavor::Gcc,
vec!["-m64".to_string(), "-arch".to_string(), "x86_64".to_string()],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These additions allow cross-compiling from aarch64 back to x86_64.

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
@nagisa
Copy link
Member

nagisa commented Jul 21, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jul 21, 2020

📌 Commit 804241e has been approved by nagisa

@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 Jul 21, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…get, r=nagisa

Add the aarch64-apple-darwin target

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…get, r=nagisa

Add the aarch64-apple-darwin target

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…get, r=nagisa

Add the aarch64-apple-darwin target

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…get, r=nagisa

Add the aarch64-apple-darwin target

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…get, r=nagisa

Add the aarch64-apple-darwin target

This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2020
…arth

Rollup of 9 pull requests

Successful merges:

 - rust-lang#73783 (Detect when `'static` obligation might come from an `impl`)
 - rust-lang#73868 (Advertise correct stable version for const control flow)
 - rust-lang#74460 (rustdoc: Always warn when linking from public to private items)
 - rust-lang#74538 (Guard against non-monomorphized type_id intrinsic call)
 - rust-lang#74541 (Add the aarch64-apple-darwin target )
 - rust-lang#74600 (Enable perf try builder)
 - rust-lang#74618 (Do not ICE on assoc type with bad placeholder)
 - rust-lang#74631 (rustc_target: Add a target spec option for disabling `--eh-frame-hdr`)
 - rust-lang#74643 (build: Remove unnecessary `cargo:rerun-if-env-changed` annotations)

Failed merges:

r? @ghost
@bors bors merged commit 8114dc7 into rust-lang:master Jul 23, 2020
@shepmaster shepmaster added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 23, 2020
@shepmaster shepmaster deleted the aarch64-apple-darwin-target branch July 24, 2020 13:22
@spastorino
Copy link
Member

Adding missing T-compiler label so it can be automatically picked up and placed in the weekly agenda.

@spastorino spastorino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 29, 2020
@pnkfelix
Copy link
Member

discussed in T-compiler meeting. beta-accepted.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 30, 2020
@Mark-Simulacrum
Copy link
Member

Note that we only cherry-picked the first commit here into beta, not the Cargo.lock changes.

@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 7, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 7, 2020
…ulacrum

[beta] backports

* Forbid non-derefable types explicitly in unsizing casts rust-lang#75136
* forbid `#[track_caller]` on main rust-lang#75130
* Fix #[track_caller] shims for trait objects. rust-lang#74784
* rustc_target: Add a target spec option for disabling `--eh-frame-hdr` rust-lang#74631
* Disable Azure Pipelines except for macOS rust-lang#74620
* Upload builds from GHA instead of Azure Pipelines rust-lang#74565
* Add the aarch64-apple-darwin target rust-lang#74541
* Use `ReEmpty(U0)` as the implicit region bound in typeck rust-lang#74509
* rustbuild: drop tool::should_install rust-lang#74457
* lint: use `transparent_newtype_field` to avoid ICE rust-lang#74340
* Don't panic if the lhs of a div by zero is not statically known rust-lang#74221
* improper_ctypes_definitions: allow `Box` rust-lang#74448
* typeck: check for infer before type impls trait rust-lang#73965
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.