valgrind fix for newer intel processors

This commit is contained in:
Anton-4 2022-08-12 12:06:31 +02:00
parent 07eed2c4a6
commit 72e60bceea
No known key found for this signature in database
GPG key ID: A13F4A6E21141925
5 changed files with 11 additions and 45 deletions

View file

@ -113,7 +113,6 @@ pub fn build_zig_host_native(
target: &str,
opt_level: OptLevel,
shared_lib_path: Option<&Path>,
_target_valgrind: bool,
) -> Output {
let mut command = Command::new(&zig_executable());
command
@ -149,13 +148,10 @@ pub fn build_zig_host_native(
target,
]);
// use single threaded testing for cli_run and enable this code if valgrind fails with unhandled instruction bytes, see #1963.
/*if target_valgrind {
command.args(&[
"-mcpu",
"x86_64"
]);
}*/
// valgrind does not yet support avx512 instructions, see #1963.
if env::var("NO_AVX512").is_ok() {
command.args(&["-mcpu", "x86_64"]);
}
if matches!(opt_level, OptLevel::Optimize) {
command.args(&["-O", "ReleaseSafe"]);
@ -177,7 +173,6 @@ pub fn build_zig_host_native(
target: &str,
opt_level: OptLevel,
shared_lib_path: Option<&Path>,
_target_valgrind: bool,
) -> Output {
let mut command = Command::new(&zig_executable());
command
@ -234,7 +229,6 @@ pub fn build_zig_host_native(
opt_level: OptLevel,
shared_lib_path: Option<&Path>,
// For compatibility with the non-macOS def above. Keep these in sync.
_target_valgrind: bool,
) -> Output {
use serde_json::Value;
@ -463,7 +457,6 @@ pub fn rebuild_host(
target: &Triple,
host_input_path: &Path,
shared_lib_path: Option<&Path>,
target_valgrind: bool,
) -> PathBuf {
let c_host_src = host_input_path.with_file_name("host.c");
let c_host_dest = host_input_path.with_file_name("c_host.o");
@ -535,7 +528,6 @@ pub fn rebuild_host(
"native",
opt_level,
shared_lib_path,
target_valgrind,
)
}
Architecture::X86_32(_) => {
@ -549,7 +541,6 @@ pub fn rebuild_host(
"i386-linux-musl",
opt_level,
shared_lib_path,
target_valgrind,
)
}
@ -564,7 +555,6 @@ pub fn rebuild_host(
target_zig_str(target),
opt_level,
shared_lib_path,
target_valgrind,
)
}
_ => panic!("Unsupported architecture {:?}", target.architecture),