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

better C error message

This commit is contained in:
Alexander Medvednikov 2019-07-29 19:39:52 +02:00
parent 4a1970a322
commit 626da27ad6

View File

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