1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

pref: make -autofree work without -gc none

This commit is contained in:
Alexander Medvednikov 2023-07-14 12:41:17 +03:00
parent 877e6ddc9f
commit 207203f599
2 changed files with 3 additions and 1 deletions

View File

@ -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' {

View File

@ -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 {