Skip to content

Commit

Permalink
Add the sha512, sm3 and sm4 target features
Browse files Browse the repository at this point in the history
Add the feature in `core/lib.rs`
  • Loading branch information
sayantn committed Aug 1, 2024
1 parent 32894e2 commit cb11051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#[stable(feature = "simd_arch", since = "1.27.0")]
pub use crate::core_arch::arch::*;

#[cfg(bootstrap)]
#[allow(dead_code)]
#[unstable(feature = "sha512_sm_x86", issue = "126624")]
fn dummy() {
// AArch64 also has a target feature named `sm4`, so we need `#![feature(sha512_sm_x86)]` in lib.rs
// But as the bootstrap compiler doesn't know about this feature yet, we need to convert it to a
// library feature until bootstrap gets bumped
}

/// Inline assembly.
///
/// Refer to [Rust By Example] for a usage guide and the [reference] for
Expand Down
1 change: 1 addition & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
#![feature(powerpc_target_feature)]
#![feature(riscv_target_feature)]
#![feature(rtm_target_feature)]
#![feature(sha512_sm_x86)]
#![feature(sse4a_target_feature)]
#![feature(tbm_target_feature)]
#![feature(wasm_target_feature)]
Expand Down

0 comments on commit cb11051

Please sign in to comment.