parent
f9fccdee85
commit
d269975784
|
@ -1448,17 +1448,22 @@ fn report_target_features() {
|
|||
not(target_os = "macos")
|
||||
))]
|
||||
{
|
||||
// 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.
|
||||
if is_x86_feature_detected!("avx") {
|
||||
info!("AVX detected");
|
||||
} else {
|
||||
error!(
|
||||
"Your machine does not have AVX support, please rebuild from source on your machine"
|
||||
);
|
||||
abort();
|
||||
}
|
||||
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.
|
||||
#[target_feature(enable = "avx")]
|
||||
unsafe fn check_avx() {
|
||||
if is_x86_feature_detected!("avx") {
|
||||
info!("AVX detected");
|
||||
} else {
|
||||
error!(
|
||||
"Your machine does not have AVX support, please rebuild from source on your machine"
|
||||
);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue