better C error message

pull/1369/head
Alexander Medvednikov 2019-07-29 19:39:52 +02:00
parent 4a1970a322
commit 626da27ad6
1 changed files with 4 additions and 3 deletions
compiler

View File

@ -806,10 +806,11 @@ mut args := ''
println('cc took $diff ms')
println('=========\n')
}
// println('C OUTPUT:')
if res.contains('error: ') {
println(res)
panic('clang error')
if v.pref.is_debug {
println(res)
}
panic('C error. This should never happen. Please create a GitHub issue.')
}
// Link it if we are cross compiling and need an executable
if v.os == .linux && !linux_host && v.pref.build_mode != .build {