mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
store temp C files in the same directory
This commit is contained in:
parent
9c63cac54d
commit
eb7aee5ae0
@ -33,8 +33,7 @@ mut:
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn new_cgen(out_name_c string) *CGen {
|
fn new_cgen(out_name_c string) *CGen {
|
||||||
//println('TmpPath: "$TmpPath"')
|
path:='.$out_name_c'
|
||||||
path:='$TmpPath/$out_name_c'
|
|
||||||
out := os.create(path) or {
|
out := os.create(path) or {
|
||||||
println('failed to create $path')
|
println('failed to create $path')
|
||||||
return &CGen{}
|
return &CGen{}
|
||||||
|
@ -597,7 +597,8 @@ mut args := ''
|
|||||||
// else {
|
// else {
|
||||||
a << '-o $v.out_name'
|
a << '-o $v.out_name'
|
||||||
// The C file we are compiling
|
// 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?
|
// Min macos version is mandatory I think?
|
||||||
if v.os == .mac {
|
if v.os == .mac {
|
||||||
@ -662,7 +663,7 @@ mut args := ''
|
|||||||
println('linux cross compilation done. resulting binary: "$v.out_name"')
|
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' {
|
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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user