diff --git a/cli/src/build.rs b/cli/src/build.rs index 97af317837..b70ef86d69 100644 --- a/cli/src/build.rs +++ b/cli/src/build.rs @@ -117,7 +117,7 @@ pub fn build_file<'a>( .keys() .map(|x| x.as_str(&loaded.interns).to_string()) .collect(), - target_valgrind + target_valgrind, ); // TODO try to move as much of this linking as possible to the precompiled @@ -290,7 +290,7 @@ fn spawn_rebuild_thread( binary_path: PathBuf, target: &Triple, exported_symbols: Vec, - target_valgrind: bool + target_valgrind: bool, ) -> std::thread::JoinHandle { let thread_local_target = target.clone(); std::thread::spawn(move || { @@ -311,7 +311,7 @@ fn spawn_rebuild_thread( &thread_local_target, host_input_path.as_path(), None, - target_valgrind + target_valgrind, ); } } diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 2958abbd64..63118350c3 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -307,7 +307,7 @@ pub fn build(matches: &ArgMatches, config: BuildConfig) -> io::Result { link_type, surgically_link, precompiled, - target_valgrind + target_valgrind, ); match res_binary_path { diff --git a/cli/tests/cli_run.rs b/cli/tests/cli_run.rs index a8975d2ff0..992e9af704 100644 --- a/cli/tests/cli_run.rs +++ b/cli/tests/cli_run.rs @@ -53,7 +53,6 @@ mod cli_run { expected_ending: &str, use_valgrind: bool, ) { - let mut all_flags = vec![]; all_flags.extend_from_slice(flags); diff --git a/cli_utils/Cargo.lock b/cli_utils/Cargo.lock index f41f503d27..4889a1da49 100644 --- a/cli_utils/Cargo.lock +++ b/cli_utils/Cargo.lock @@ -2398,8 +2398,6 @@ name = "roc_build" version = "0.1.0" dependencies = [ "bumpalo", - "im", - "im-rc", "inkwell 0.1.0", "libloading 0.7.1", "roc_builtins", @@ -2440,8 +2438,6 @@ name = "roc_can" version = "0.1.0" dependencies = [ "bumpalo", - "im", - "im-rc", "roc_builtins", "roc_collections", "roc_module", @@ -2459,8 +2455,6 @@ dependencies = [ "bumpalo", "clap 3.0.0-beta.5", "const_format", - "im", - "im-rc", "inkwell 0.1.0", "libloading 0.7.1", "mimalloc", @@ -2562,8 +2556,6 @@ dependencies = [ "fs_extra", "futures", "glyph_brush", - "im", - "im-rc", "libc", "log", "nonempty", @@ -2599,8 +2591,6 @@ name = "roc_fmt" version = "0.1.0" dependencies = [ "bumpalo", - "im", - "im-rc", "roc_collections", "roc_module", "roc_parse", @@ -2612,8 +2602,6 @@ name = "roc_gen_dev" version = "0.1.0" dependencies = [ "bumpalo", - "im", - "im-rc", "object 0.26.2", "roc_builtins", "roc_collections", @@ -2632,20 +2620,13 @@ name = "roc_gen_llvm" version = "0.1.0" dependencies = [ "bumpalo", - "im", - "im-rc", "inkwell 0.1.0", "morphic_lib", "roc_builtins", "roc_collections", "roc_module", "roc_mono", - "roc_problem", - "roc_region", - "roc_solve", "roc_std", - "roc_types", - "roc_unify", "target-lexicon", ] @@ -2654,6 +2635,7 @@ name = "roc_gen_wasm" version = "0.1.0" dependencies = [ "bumpalo", + "roc_builtins", "roc_collections", "roc_module", "roc_mono", @@ -2726,7 +2708,6 @@ version = "0.1.0" dependencies = [ "bumpalo", "hashbrown 0.11.2", - "linked-hash-map", "morphic_lib", "roc_can", "roc_collections", @@ -2737,7 +2718,6 @@ dependencies = [ "roc_std", "roc_types", "roc_unify", - "ven_ena", "ven_graph", "ven_pretty", ] @@ -2773,8 +2753,6 @@ version = "0.1.0" dependencies = [ "bumpalo", "distance", - "im", - "im-rc", "roc_can", "roc_collections", "roc_module", diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 484178415b..92572650c3 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -86,7 +86,7 @@ pub fn build_zig_host_native( target: &str, opt_level: OptLevel, shared_lib_path: Option<&Path>, - target_valgrind: bool, + _target_valgrind: bool, ) -> Output { let mut command = Command::new("zig"); command @@ -120,12 +120,13 @@ pub fn build_zig_host_native( target, ]); - if target_valgrind { + // 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" ]); - } + }*/ if matches!(opt_level, OptLevel::Optimize) { command.args(&["-O", "ReleaseSafe"]); @@ -350,6 +351,7 @@ pub fn rebuild_host( shared_lib_path: Option<&Path>, target_valgrind: bool, ) { + dbg!("rebuilding host"); 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"); let zig_host_src = host_input_path.with_file_name("host.zig"); @@ -418,7 +420,7 @@ pub fn rebuild_host( "i386-linux-musl", opt_level, shared_lib_path, - target_valgrind + target_valgrind, ) } @@ -433,7 +435,7 @@ pub fn rebuild_host( target_triple_str(target), opt_level, shared_lib_path, - target_valgrind + target_valgrind, ) } _ => panic!("Unsupported architecture {:?}", target.architecture), diff --git a/linker/src/lib.rs b/linker/src/lib.rs index 58f801115f..9bd11cecb6 100644 --- a/linker/src/lib.rs +++ b/linker/src/lib.rs @@ -146,7 +146,13 @@ pub fn build_and_preprocess_host( ) -> io::Result<()> { let dummy_lib = host_input_path.with_file_name("libapp.so"); generate_dynamic_lib(target, exposed_to_host, &dummy_lib)?; - rebuild_host(opt_level, target, host_input_path, Some(&dummy_lib), target_valgrind); + rebuild_host( + opt_level, + target, + host_input_path, + Some(&dummy_lib), + target_valgrind, + ); let dynhost = host_input_path.with_file_name("dynhost"); let metadata = host_input_path.with_file_name("metadata"); let prehost = host_input_path.with_file_name("preprocessedhost");