builder: do not remove executables after run when -keepc is passed; add `-d trace_thirdparty_obj_files`
parent
b1f6ff8871
commit
4b45f2eaab
|
@ -836,7 +836,9 @@ fn (mut v Builder) build_thirdparty_obj_file(path string, moduleflags []cflag.CF
|
|||
os.chdir(os.dir(pref.vexe_path()))
|
||||
//
|
||||
cmd := '$v.pref.ccompiler $cppoptions $v.pref.third_party_option $btarget -o "$opath" -c "$cfile" $atarget'
|
||||
// eprintln('>>> cmd: $cmd')
|
||||
$if trace_thirdparty_obj_files ? {
|
||||
println('>>> build_thirdparty_obj_files cmd: $cmd')
|
||||
}
|
||||
res := os.exec(cmd) or {
|
||||
eprintln('exec failed for thirdparty object build cmd:\n$cmd')
|
||||
verror(err)
|
||||
|
|
|
@ -139,6 +139,10 @@ fn (mut b Builder) run_compiled_executable_and_exit() {
|
|||
}
|
||||
|
||||
fn (mut v Builder) cleanup_run_executable_after_exit(exefile string) {
|
||||
if v.pref.reuse_tmpc {
|
||||
v.pref.vrun_elog('keeping executable: $exefile , because -keepc was passed')
|
||||
return
|
||||
}
|
||||
if os.is_file(exefile) {
|
||||
v.pref.vrun_elog('remove run executable: $exefile')
|
||||
os.rm(exefile)
|
||||
|
|
Loading…
Reference in New Issue