Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking unstable (94d55be) and #6039 together #6054

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lighthouse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ lazy_static! {
pub static ref LONG_VERSION: String = format!(
"{}\n\
BLS library: {}\n\
BLS hardware acceleration: {}\n\
SHA256 hardware acceleration: {}\n\
Allocator: {}\n\
Profile: {}\n\
Specs: mainnet (true), minimal ({}), gnosis ({})",
SHORT_VERSION.as_str(),
bls_library_name(),
bls_hardware_acceleration(),
have_sha_extensions(),
allocator_name(),
build_profile_name(),
Expand All @@ -50,6 +52,15 @@ fn bls_library_name() -> &'static str {
}
}

#[inline(always)]
fn bls_hardware_acceleration() -> bool {
#[cfg(target_arch = "x86_64")]
return std::is_x86_feature_detected!("adx");

#[cfg(target_arch = "aarch64")]
return std::arch::is_aarch64_feature_detected!("neon");
}

fn allocator_name() -> &'static str {
if cfg!(target_os = "windows") {
"system"
Expand Down
Loading