diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index 053b89d5b7be85..95806b3f93a1f1 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -494,6 +494,7 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin } '-autofree' { res.autofree = true + res.gc_mode = .no_gc res.build_options << arg } '-trace-calls' { diff --git a/vlib/v/slow_tests/valgrind/valgrind_test.v b/vlib/v/slow_tests/valgrind/valgrind_test.v index 6a0369d20e8451..4dfe1040ef90be 100644 --- a/vlib/v/slow_tests/valgrind/valgrind_test.v +++ b/vlib/v/slow_tests/valgrind/valgrind_test.v @@ -87,7 +87,8 @@ fn test_all() { base_filename := os.file_name(test).replace('.v', '') exe_filename := '${wrkdir}/${base_filename}' full_path_to_source_file := os.join_path(vroot, test) - compile_cmd := '${os.quoted_path(vexe)} -o ${os.quoted_path(exe_filename)} -cg -cflags "-w" -experimental -gc none -autofree ${os.quoted_path(full_path_to_source_file)}' + compile_cmd := '${os.quoted_path(vexe)} -o ${os.quoted_path(exe_filename)} -cg -cflags ' + + ' "-w" -experimental -autofree ${os.quoted_path(full_path_to_source_file)}' vprintln('compile cmd: ${bold(compile_cmd)}') res := os.execute(compile_cmd) if res.exit_code != 0 {