Skip to content

Commit

Permalink
pref: make -autofree work without -gc none
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Jul 14, 2023
1 parent 877e6dd commit 207203f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions vlib/v/pref/pref.v
Expand Up @@ -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' {
Expand Down
3 changes: 2 additions & 1 deletion vlib/v/slow_tests/valgrind/valgrind_test.v
Expand Up @@ -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 {
Expand Down

0 comments on commit 207203f

Please sign in to comment.