Skip to content

Commit 7f99d5d

Browse files
committed
v.builder: improve the error message for failing cgen; suggest -g and -show-c-output
1 parent 4b03c33 commit 7f99d5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vlib/v/builder/cc.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ fn (mut v Builder) post_process_c_compiler_output(ccompiler string, res os.Resul
7676
println('(note: the original output was ${original_elines.len} lines long; it was truncated to its first ${elines.len} lines + the last line)')
7777
}
7878
println('='.repeat(header.len))
79-
println('(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).')
79+
println('Try passing `-g` when compiling, to see a .v file:line information, that correlates more with the C error.')
80+
println('(Alternatively, pass `-show-c-output`, to print the full C error message).')
8081
}
8182
}
8283
if os.getenv('V_NO_C_ERROR_INFO') != '' {

0 commit comments

Comments
 (0)