-
Notifications
You must be signed in to change notification settings - Fork 102
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
portable-atomic 0.3.19 fails to compile on aarch64 / Apple Silicon #1400
Comments
What does |
|
Here is the relevant line with
|
Looks like it is necessary to pass |
The workaround works. For the record, Apple M1 / M2 are But is there a way for us to pass the correct https://doc.rust-lang.org/reference/inline-assembly.html#rules-for-inline-assembly
|
I presume it has to be based on the |
Does this problem also exist in the main branch of portable-atomic? I hope taiki-e/portable-atomic#98 (which switched from
|
cg_clif doesn't currently set |
If the compiler version is greater than 1.61 or is nightly or compiler version detection fails, portable-atomic will not set that cfg. (That cfg is a hack for older compilers whose aarch64_target_feature is not stable.) https://github.com/taiki-e/portable-atomic/blob/35ca3edc081e37ea52844d8ea6f2b5361b4bbc75/build.rs#L355 And I also confirmed that cg_clif does not set // no compile error even if compiled with RUSTFLAGS='-C target-feature=+lse'
#[cfg(target_feature = "lse")]
compile_error!("target_feature");
#[cfg(portable_atomic_target_feature = "lse")]
compile_error!("portable_atomic_target_feature"); So, I think the reason is that Since it has already been replaced with |
taiki-e/portable-atomic#98 has been published in portable-atomic 1.5.0. (If you are using 0.3.x and cannot upgrade to 1.x for some reason, you can also get that change by using 0.3.20+ which is built on top of 1.x.) |
By the way, portable-atomic now tests compatibility with cg_clif in its CI (for x86_64, aarch64, riscv64). taiki-e/portable-atomic@4c8156a |
cargo build
works fine.(I'm on Apple M2 if that makes any difference...)
The text was updated successfully, but these errors were encountered: