compiler: improve errors when building thirdparty .o files

pull/2574/head
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)
}