Skip to content

Commit

Permalink
[build] Replace rustflags target-feature=+crypto with +aes,+sha2
Browse files Browse the repository at this point in the history
Something changed recently in rustc that causes it to generate warnings
when building for arm64 targets.

This appears related to rust-lang/rust#87729
(though that PR is dated), which indicates that rustc is removing the
crypto target and replacing it with "aes or sha2".

This PR adds both, and removes crypto, for Rust only. (This does not
work with clang (cflags).

Change-Id: I438e2d3ae230fb512c7c864d775537ce4dd797f4
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/654243
Reviewed-by: Chris Tam <[email protected]>
Fuchsia-Auto-Submit: Rich Kadel <[email protected]>
Reviewed-by: Tyler Mandry <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
richkadel authored and Commit Bot committed Mar 7, 2022
1 parent 3998b66 commit 7309bf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/config/arm64/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config("arm64") {
# rustc --target=aarch64-fuchsia --print target-features
# `armv8a` and `simd` features are assumed by the target triple
# `aarch64-fuchsia`.
rustflags = [ "-Ctarget-feature=+crc,+crypto" ]
rustflags = [ "-Ctarget-feature=+crc,+aes,+sha2" ]
}

config("cortex-a53") {
Expand All @@ -32,7 +32,7 @@ config("cortex-a53") {
# TODO(fxbug.dev/87243): consider the below.
#rustflags = [ "-Ctarget-cpu=cortex-a53" ]

rustflags = [ "-Ctarget-feature=+crc,+crypto,+neon" ]
rustflags = [ "-Ctarget-feature=+crc,+aes,+sha2,+neon" ]
}

config("no-outline-atomics") {
Expand Down

0 comments on commit 7309bf5

Please sign in to comment.