From 04bd8d7f7dc98633a73f5d730c5ec06bd96c002f Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 23 Jul 2019 09:36:57 +0300 Subject: [PATCH] compiler: Fix for #1268 . Passing -o file.c, skips the C compiler invocation and leaves the intermediary file.c . --- compiler/main.v | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/main.v b/compiler/main.v index d8f936f8c0..8abc2a129d 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -694,7 +694,11 @@ mut args := '' //} $if windows { cmd = 'gcc $args' - } + } + if v.out_name.ends_with('.c') { + os.mv( '.$v.out_name_c', v.out_name ) + exit(0) + } // Run ticks := time.ticks() res := os.exec(cmd)