1 | module main |
2 | |
3 | import os |
4 | |
5 | fn main() { |
6 | vexe := os.real_path(os.getenv_opt('VEXE') or { @VEXE }) |
7 | vroot := os.dir(vexe) |
8 | os.chdir(vroot)! |
9 | os.setenv('VCOLORS', 'always', true) |
10 | self_idx := os.args.index('tracev') |
11 | args := os.args[1..self_idx] |
12 | args_str := args.join(' ') |
13 | options := if args.len > 0 { '(${args_str})' } else { '' } |
14 | println('Compiling a `tracev` executable ${options}...') |
15 | os.system('${os.quoted_path(vexe)} -cg -d trace_parser -d trace_checker -d trace_gen -o tracev ${args_str} cmd/v') |
16 | } |