compiler: fix v_win.c generation

pull/1787/head
Alexander Medvednikov 2019-08-30 00:07:54 +03:00
parent 2fe20cd092
commit b17bf5843c
1 changed files with 5 additions and 4 deletions

View File

@ -10,6 +10,11 @@ import (
) )
fn (v mut V) cc() { fn (v mut V) cc() {
// Just create a c file and exit
if v.out_name.ends_with('.c') {
os.mv(v.out_name_c, v.out_name)
exit(0)
}
// Cross compiling for Windows // Cross compiling for Windows
if v.os == .windows { if v.os == .windows {
$if !windows { $if !windows {
@ -133,10 +138,6 @@ mut args := ''
} }
args := a.join(' ') args := a.join(' ')
cmd := '${v.pref.ccompiler} $args' cmd := '${v.pref.ccompiler} $args'
if v.out_name.ends_with('.c') {
os.mv( v.out_name_c, v.out_name )
exit(0)
}
// Run // Run
if v.pref.show_c_cmd || v.pref.is_verbose { if v.pref.show_c_cmd || v.pref.is_verbose {
println('\n==========') println('\n==========')