Skip to content

Commit

Permalink
cpu.rs: don't build the arm module when on non-arm
Browse files Browse the repository at this point in the history
For initial ppc64le support, we are assuming POWER8 and above, therefore
we do not (yet?) need a specific Features struct for the architecture.
However, this arm struct will complain that it is never constructed, and
there are unused functions. Therefore, we don't build it on non-arm.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
  • Loading branch information
erichte-ibm authored and ruscur committed Jul 30, 2021
1 parent 2565ff4 commit 1657692
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ pub(crate) fn features() -> Features {
Features(())
}

#[cfg_attr(
not(any(target_arch = "arm", target_arch = "aarch64")),
allow(dead_code)
)]
pub(crate) mod arm {
#[cfg(all(
any(target_os = "android", target_os = "linux"),
Expand Down

0 comments on commit 1657692

Please sign in to comment.