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

compiler: improve errors when building thirdparty .o files

This commit is contained in:
Delyan Angelov 2019-10-28 11:43:57 +02:00 committed by Alexander Medvednikov
parent 44b99bc299
commit 15deaa7eb6
2 changed files with 11 additions and 0 deletions

View File

@ -267,6 +267,11 @@ fn build_thirdparty_obj_file(path string, moduleflags []CFlag) {
verror(err)
return
}
if res.exit_code != 0 {
println('failed thirdparty object build cmd: $cmd')
verror(res.output)
return
}
println(res.output)
}

View File

@ -414,9 +414,15 @@ fn build_thirdparty_obj_file_with_msvc(path string, moduleflags []CFlag) {
//NB: the quotes above ARE balanced.
println('thirdparty cmd line: $cmd')
res := os.exec(cmd) or {
println('msvc: failed thirdparty object build cmd: $cmd')
verror(err)
return
}
if res.exit_code != 0 {
println('msvc: failed thirdparty object build cmd: $cmd')
verror(res.output)
return
}
println(res.output)
}