Avoid is_x86_feature_detected when not building for x86
This commit is contained in:
parent
b7614abb9e
commit
1ca4913328
|
@ -750,16 +750,19 @@ fn report_target_features() {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||||
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
|
||||||
// the mismatch and error cleanly.
|
|
||||||
#[target_feature(enable = "avx")]
|
|
||||||
{
|
{
|
||||||
if is_x86_feature_detected!("avx") {
|
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
||||||
info!("AVX detected");
|
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
||||||
} else {
|
// the mismatch and error cleanly.
|
||||||
error!("Your machine does not have AVX support, please rebuild from source on your machine");
|
#[target_feature(enable = "avx")]
|
||||||
process::exit(1);
|
{
|
||||||
|
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");
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue