tools: simplify gen_vc.v
parent
a761f6888f
commit
eaf930aa8b
|
@ -278,9 +278,8 @@ fn (mut gen_vc GenVC) generate() {
|
||||||
gen_vc.assert_file_exists_and_is_not_too_short(v_exec, err_msg_make)
|
gen_vc.assert_file_exists_and_is_not_too_short(v_exec, err_msg_make)
|
||||||
// build v.c for each os
|
// build v.c for each os
|
||||||
for os_name in vc_build_oses {
|
for os_name in vc_build_oses {
|
||||||
vc_suffix := if os_name == 'nix' { '' } else { '_${os_name[..3]}' }
|
c_file := if os_name == 'nix' { 'v.c' } else { 'v_win.c' }
|
||||||
v_flags := if os_name == 'nix' { '-os cross' } else { '-os $os_name' }
|
v_flags := if os_name == 'nix' { '-os cross' } else { '-os $os_name' }
|
||||||
c_file := 'v${vc_suffix}.c'
|
|
||||||
// try generate .c file
|
// try generate .c file
|
||||||
gen_vc.cmd_exec('$v_exec $v_flags -o $c_file $git_repo_dir_v/cmd/v')
|
gen_vc.cmd_exec('$v_exec $v_flags -o $c_file $git_repo_dir_v/cmd/v')
|
||||||
// check if the c file seems ok
|
// check if the c file seems ok
|
||||||
|
|
Loading…
Reference in New Issue