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

Unable to build with rustc_codegen_cranelift on Apple M1 #2129

Open
nsabovic opened this issue Jul 29, 2024 · 3 comments
Open

Unable to build with rustc_codegen_cranelift on Apple M1 #2129

nsabovic opened this issue Jul 29, 2024 · 3 comments

Comments

@nsabovic
Copy link

Trying to compile a project that depends on ring with Cranelift fails. I didn't see any issue filed about it so I thought there should be a place to track progress.

While they plan on implementing a bunch of std::arch SIMD intrinsics, maybe the correct solution is to check for cranelift and not use them?

Versions:

  • ring 0.17.8
  • cranelift_codegen 0.110.1
  • rustc_codegen_cranelift 0.1.0
  • rustc 1.82.0-nightly (b5d44db1d 2024-07-26)
error[E0080]: evaluation of constant value failed
   --> /Users/nsabovic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/src/cpu/arm.rs:352:54
    |
352 |   const _AARCH64_APPLE_TARGETS_EXPECTED_FEATURES: () = assert!(
    |  ______________________________________________________^
353 | |     ((ARMCAP_STATIC & _AARCH64_APPLE_FEATURES) == _AARCH64_APPLE_FEATURES)
354 | |         || !cfg!(all(target_arch = "aarch64", target_vendor = "apple"))
355 | | );
    | |_^ the evaluated program panicked at 'assertion failed: ((ARMCAP_STATIC & _AARCH64_APPLE_FEATURES) == _AARCH64_APPLE_FEATURES) ||
    !cfg!(all(target_arch = "aarch64", target_vendor = "apple"))', /Users/nsabovic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/src/cpu/arm.rs:352:54
    |
    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
@briansmith
Copy link
Owner

Which target features does ring expect that cranelift isn't enabling automatically for these targets?

@LeonardoRosaa
Copy link

Similar issue here.

@briansmith
Copy link
Owner

How can we detect cranelift in a cfg expression?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants