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

@ -46,7 +46,6 @@ pub fn build_file<'a>(
link_type: LinkType,
linking_strategy: LinkingStrategy,
precompiled: bool,
target_valgrind: bool,
threading: Threading,
wasm_dev_stack_bytes: Option<u32>,
) -> Result<BuiltFile, LoadingProblem<'a>> {
@ -152,7 +151,6 @@ pub fn build_file<'a>(
target,
exposed_values,
exposed_closure_types,
target_valgrind,
);
// TODO try to move as much of this linking as possible to the precompiled
@ -377,7 +375,6 @@ fn spawn_rebuild_thread(
target: &Triple,
exported_symbols: Vec<String>,
exported_closure_types: Vec<String>,
target_valgrind: bool,
) -> std::thread::JoinHandle<u128> {
let thread_local_target = target.clone();
std::thread::spawn(move || {
@ -395,7 +392,6 @@ fn spawn_rebuild_thread(
&thread_local_target,
host_input_path.as_path(),
None,
target_valgrind,
);
preprocess_host_wasm32(host_dest.as_path(), &preprocessed_host_path);
@ -408,7 +404,6 @@ fn spawn_rebuild_thread(
preprocessed_host_path.as_path(),
exported_symbols,
exported_closure_types,
target_valgrind,
);
}
LinkingStrategy::Legacy => {
@ -417,7 +412,6 @@ fn spawn_rebuild_thread(
&thread_local_target,
host_input_path.as_path(),
None,
target_valgrind,
);
}
}

View file

@ -57,7 +57,6 @@ pub const FLAG_TARGET: &str = "target";
pub const FLAG_TIME: &str = "time";
pub const FLAG_LINKER: &str = "linker";
pub const FLAG_PRECOMPILED: &str = "precompiled-host";
pub const FLAG_VALGRIND: &str = "valgrind";
pub const FLAG_CHECK: &str = "check";
pub const FLAG_WASM_STACK_SIZE_KB: &str = "wasm-stack-size-kb";
pub const ROC_FILE: &str = "ROC_FILE";
@ -96,11 +95,6 @@ pub fn build_app<'a>() -> Command<'a> {
.help("Store LLVM debug information in the generated program.")
.required(false);
let flag_valgrind = Arg::new(FLAG_VALGRIND)
.long(FLAG_VALGRIND)
.help("Some assembly instructions are not supported by valgrind, this flag prevents those from being output when building the host.")
.required(false);
let flag_time = Arg::new(FLAG_TIME)
.long(FLAG_TIME)
.help("Prints detailed compilation time information.")
@ -152,7 +146,6 @@ pub fn build_app<'a>() -> Command<'a> {
.arg(flag_time.clone())
.arg(flag_linker.clone())
.arg(flag_precompiled.clone())
.arg(flag_valgrind.clone())
.arg(flag_wasm_stack_size_kb.clone())
.arg(
Arg::new(FLAG_TARGET)
@ -192,7 +185,6 @@ pub fn build_app<'a>() -> Command<'a> {
.arg(flag_time.clone())
.arg(flag_linker.clone())
.arg(flag_precompiled.clone())
.arg(flag_valgrind.clone())
.arg(
Arg::new(ROC_FILE)
.help("The .roc file for the main module")
@ -215,7 +207,6 @@ pub fn build_app<'a>() -> Command<'a> {
.arg(flag_time.clone())
.arg(flag_linker.clone())
.arg(flag_precompiled.clone())
.arg(flag_valgrind.clone())
.arg(roc_file_to_run.clone())
.arg(args_for_app.clone())
)
@ -282,7 +273,6 @@ pub fn build_app<'a>() -> Command<'a> {
.arg(flag_time)
.arg(flag_linker)
.arg(flag_precompiled)
.arg(flag_valgrind)
.arg(roc_file_to_run.required(false))
.arg(args_for_app);
@ -531,7 +521,6 @@ pub fn build(
.and_then(|s| s.parse::<u32>().ok())
.map(|x| x * 1024);
let target_valgrind = matches.is_present(FLAG_VALGRIND);
let res_binary_path = build_file(
&arena,
&triple,
@ -542,7 +531,6 @@ pub fn build(
link_type,
linking_strategy,
precompiled,
target_valgrind,
threading,
wasm_dev_stack_bytes,
);