-
Notifications
You must be signed in to change notification settings - Fork 107
evaluation of constant value failed
on macOS M1
#1522
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
Comments
Looks like ring assumes that on arm64 macOS, the neon, aes, sha256 and pmull features are available: https://github.com/briansmith/ring/blob/7c0024abaf4fd59250c9b79cc41a029aa0ef3497/src/cpu/arm/darwin.rs#L35 This is indeed the case, but except for neon, cg_clif doesn't set them in rustc_codegen_cranelift/src/lib.rs Lines 194 to 196 in 39bc103
|
@bjorn3 Can you drop some pointers on how this should be properly implemented? Or how LLVM handles it? I am interested to working on it. |
For cfg(target_feature) that would be adding another case like rustc_codegen_cranelift/src/lib.rs Line 194 in 68b99fc
|
@bjorn3 I am thinking of using the Should I follow this approach? |
That doesn't work for cross-compilation. And it only supports part of the target features ring needs anyway. The features ring need are default features for the arm64-apple-darwin target, so adding a case like rustc_codegen_cranelift/src/lib.rs Line 194 in 68b99fc
|
Ring's test suite passes on arm64 macOS now. |
While compiling briansmith/ring@7c0024a on macOS M1 using
the compiler errors out by issuing
evaluation of constant value failed
:Nightly rust version:
Thanks for the enormous work! ❤️
The text was updated successfully, but these errors were encountered: