2020-07-20 12:36:27 +03:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
|
|
|
import v.pref
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
vexe := pref.vexe_path()
|
|
|
|
vroot := os.dir(vexe)
|
2022-10-16 09:28:57 +03:00
|
|
|
os.chdir(vroot)!
|
2020-07-20 12:36:27 +03:00
|
|
|
os.setenv('VCOLORS', 'always', true)
|
|
|
|
self_idx := os.args.index('tracev')
|
|
|
|
args := os.args[1..self_idx]
|
|
|
|
args_str := args.join(' ')
|
2022-11-15 16:53:13 +03:00
|
|
|
options := if args.len > 0 { '(${args_str})' } else { '' }
|
2020-07-20 12:36:27 +03:00
|
|
|
println('Compiling a `tracev` executable ${options}...')
|
2022-11-15 16:53:13 +03:00
|
|
|
os.system('${os.quoted_path(vexe)} -cg -d trace_parser -d trace_checker -d trace_gen -o tracev ${args_str} cmd/v')
|
2020-07-20 12:36:27 +03:00
|
|
|
}
|