Disable reed-solomon-erasure/simd-accel feature on aarch64 (Apple M1)

This feature requires clang to support -march=native on M1. Before this change,
cargo build would output a build error when building for aarch64.

(cherry picked from commit 8a9b7f5ef2)

# Conflicts:
#	ledger/Cargo.toml
This commit is contained in:
Alfonso Subiotto Marques
2021-06-07 10:19:37 +02:00
committed by Michael Vines
parent aedcab846c
commit 1cc32c9cda
2 changed files with 17 additions and 0 deletions

View File

@ -76,5 +76,10 @@ exclude = [
"programs/bpf",
]
# TODO: Remove once the "simd-accel" feature from the reed-solomon-erasure
# dependency is supported on Apple M1. v2 of the feature resolver is needed to
# specify arch-specific features.
resolver = "2"
[profile.dev]
split-debuginfo = "unpacked"

View File

@ -30,8 +30,12 @@ prost = "0.8.0"
rand = "0.7.0"
rand_chacha = "0.2.2"
rayon = "1.5.0"
<<<<<<< HEAD
reed-solomon-erasure = { version = "4.0.2", features = ["simd-accel"] }
serde = "1.0.122"
=======
serde = "1.0.126"
>>>>>>> 8a9b7f5ef (Disable reed-solomon-erasure/simd-accel feature on aarch64 (Apple M1))
serde_bytes = "0.11.5"
sha2 = "0.9.2"
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.7.9" }
@ -55,6 +59,14 @@ tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
trees = "0.2.1"
# Disable reed-solomon-erasure/simd-accel feature on aarch64 only since it
# requires clang to support -march=native.
[target.'cfg(any(target_arch = "aarch64", target_arch = "aarch64_apple_darwin"))'.dependencies]
reed-solomon-erasure = { version = "4.0.2" }
[target.'cfg(not(any(target_arch = "aarch64", target_arch = "aarch64_apple_darwin")))'.dependencies]
reed-solomon-erasure = { version = "4.0.2", features = ["simd-accel"] }
[dependencies.rocksdb]
# Avoid the vendored bzip2 within rocksdb-sys that can cause linker conflicts
# when also using the bzip2 crate