1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builder: show the contents of the C .rsp file on -showcc

This commit is contained in:
Delyan Angelov 2020-07-10 13:07:17 +03:00
parent 203bec634c
commit 75b7b9564a

View File

@ -396,7 +396,8 @@ fn (mut v Builder) cc() {
} }
// write args to response file // write args to response file
response_file := '${v.out_name_c}.rsp' response_file := '${v.out_name_c}.rsp'
os.write_file(response_file, args.replace('\\', '\\\\')) or { response_file_content := args.replace('\\', '\\\\')
os.write_file(response_file, response_file_content) or {
verror('Unable to write response file "$response_file"') verror('Unable to write response file "$response_file"')
} }
start: start:
@ -405,8 +406,14 @@ fn (mut v Builder) cc() {
cmd := '$ccompiler @$response_file' cmd := '$ccompiler @$response_file'
// Run // Run
if v.pref.is_verbose || v.pref.show_cc { if v.pref.is_verbose || v.pref.show_cc {
println('\n==========') println('')
println(cmd) println('=====================')
println('> C compiler cmd: $cmd')
if v.pref.show_cc {
println("> C compiler response file $response_file:")
println(response_file_content)
}
println('=====================')
} }
ticks := time.ticks() ticks := time.ticks()
res := os.exec(cmd) or { res := os.exec(cmd) or {