From eb7aee5ae0edb668c4463480de8d685a625c2d5e Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 16 Jul 2019 02:12:05 +0200 Subject: [PATCH] store temp C files in the same directory --- compiler/cgen.v | 3 +-- compiler/main.v | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/cgen.v b/compiler/cgen.v index 6491113509..3585c8e1c0 100644 --- a/compiler/cgen.v +++ b/compiler/cgen.v @@ -33,8 +33,7 @@ mut: } fn new_cgen(out_name_c string) *CGen { - //println('TmpPath: "$TmpPath"') - path:='$TmpPath/$out_name_c' + path:='.$out_name_c' out := os.create(path) or { println('failed to create $path') return &CGen{} diff --git a/compiler/main.v b/compiler/main.v index 0492a0736a..a8519a00a4 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -597,7 +597,8 @@ mut args := '' // else { a << '-o $v.out_name' // The C file we are compiling - a << '"$TmpPath/$v.out_name_c"' + //a << '"$TmpPath/$v.out_name_c"' + a << '".$v.out_name_c"' // } // Min macos version is mandatory I think? if v.os == .mac { @@ -662,7 +663,7 @@ mut args := '' println('linux cross compilation done. resulting binary: "$v.out_name"') } if !v.pref.is_debug && v.out_name_c != 'v.c' && v.out_name_c != 'v_macos.c' { - //os.rm('$TmpPath/$v.out_name_c') + os.rm('.$v.out_name_c') } }