Clean up build warning

This commit is contained in:
Michael Vines 2021-04-11 18:02:11 -07:00
parent 54ef065cc8
commit 17a173ebb5
1 changed files with 11 additions and 16 deletions

View File

@ -1408,15 +1408,9 @@ fn report_target_features() {
not(target_os = "macos") not(target_os = "macos")
))] ))]
{ {
unsafe { check_avx() }; // Validator binaries built on a machine with AVX support will generate invalid opcodes
} // when run on machines without AVX causing a non-obvious process abort. Instead detect
} // the mismatch and error cleanly.
// Validator binaries built on a machine with AVX support will generate invalid opcodes
// when run on machines without AVX causing a non-obvious process abort. Instead detect
// the mismatch and error cleanly.
#[target_feature(enable = "avx")]
unsafe fn check_avx() {
if is_x86_feature_detected!("avx") { if is_x86_feature_detected!("avx") {
info!("AVX detected"); info!("AVX detected");
} else { } else {
@ -1425,6 +1419,7 @@ unsafe fn check_avx() {
); );
abort(); abort();
} }
}
} }
// Get the activated stake percentage (based on the provided bank) that is visible in gossip // Get the activated stake percentage (based on the provided bank) that is visible in gossip