From b17bf5843cf053ac876ebc8a01404d0a549fec7e Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 30 Aug 2019 00:07:54 +0300 Subject: [PATCH] compiler: fix v_win.c generation --- compiler/cc.v | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/cc.v b/compiler/cc.v index c97da470fb..ee56eed215 100644 --- a/compiler/cc.v +++ b/compiler/cc.v @@ -10,6 +10,11 @@ import ( ) 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 if v.os == .windows { $if !windows { @@ -133,10 +138,6 @@ mut args := '' } args := a.join(' ') cmd := '${v.pref.ccompiler} $args' - if v.out_name.ends_with('.c') { - os.mv( v.out_name_c, v.out_name ) - exit(0) - } // Run if v.pref.show_c_cmd || v.pref.is_verbose { println('\n==========')