Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

build fails on arm64 #716

Closed
vielmetti opened this issue Mar 28, 2019 · 1 comment
Closed

build fails on arm64 #716

vielmetti opened this issue Mar 28, 2019 · 1 comment

Comments

@vielmetti
Copy link

Building on a Packet c1.large.arm (arm64, ThunderX) system I get this error:

error[E0425]: cannot find function `parse_x86_cpuid` in this scope
  --> cranelift-native/src/lib.rs:45:9
   |
45 |         parse_x86_cpuid(&mut isa_builder)?;
   |         ^^^^^^^^^^^^^^^ not found in this scope
error: Could not compile `cranelift-native`.

is there arm64 support in this package? I did not expect to get this codepath.

@bnjbvr
Copy link
Member

bnjbvr commented Mar 28, 2019

What happens is that the method exists if and only if we're on the expected target, but the way cfg!(...) is replaced by the boolean value at compile time, meaning that the resulting code is e.g. if true { parse_x86_cpuid(...) } (or on your platform, it'd be if false {).

I think we need to stub out the function in the other case, or use an additional dependency cfg-if to properly do this.

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

No branches or pull requests

2 participants