-
Notifications
You must be signed in to change notification settings - Fork 452
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
The target passed to clang is wrong for aarch64-apple-darwin #542
Comments
Anyone working on this? |
Hello there, any Status on this? |
I for one have no problem compiling for M1. I don't see any unrecognized flags passed to cc. I do observe additional --target flag if I attempt to compile with |
No, it isn't,
however this does when the target doesn't need the flags:
For example, when compinling ring the aarch64 target doesn't work because it gives this error:
|
What I meant was that if I run |
Ah, got it, sorry I misunderstood. Btw I used o64-clang (for amd64 builds) instead of o64h-clang (for aarch64 builds) and somehow, it worked.
|
In other words cc-rs did nothing wrong. At least in the sense that it passed same flags as it would to generic clang [for MacOS]. Case can be dismissed. |
for some weird reason, this works:
but this doesn't:
|
Still looks like it's between you and your C compiler... In other words, I still don't see cc-rs doing anything wrong... |
HMmmmmmmm |
If anyone is having the same issue with o64h-clang, I started this issue tpoechtrager/osxcross#333 |
In the case of ring issues, the latest version (0.17) redoes the ARM target detection so the "unsupported ARM architecture" error may no longer be relevant. I do build and test on aarch64-apple-darwin and it works fine so I think any issues here are likely (a) solved with ring 0.17, for people having problems with ring, and/or (b) issues with cross-compiling toolchains. |
Awesome. Unfortunately due to work, I can't test it. But as soon as I'm available I'll let you guys know |
cc-rs passes the rust target unchanged, but unfortunately, in the case of aarch64-apple-darwin, the clang target is different, and clang doesn't recognize aarch64-apple-darwin at all. The right target to use is arm64-apple-darwin.
The text was updated successfully, but these errors were encountered: