We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rm -f hello ; V2CFLAGS=-Wno-incompatible-pointer-types V2CC=/opt/homebrew/bin/gcc-15 v run cmd/v2/v2.v -backend cleanc cmd/v2/hello.v
1 parent 233e434 commit edfdf4dCopy full SHA for edfdf4d
1 file changed
vlib/v2/builder/builder.v
@@ -125,7 +125,12 @@ fn (mut b Builder) gen_cleanc() {
125
cc_start := sw.elapsed()
126
cc := os.getenv_opt('V2CC') or { 'cc' }
127
cc_flags := os.getenv_opt('V2CFLAGS') or { '' }
128
- cc_cmd := '${cc} ${cc_flags} -w ${c_file} -o ${output_name} -ferror-limit=0'
+ version_res := os.execute('${cc} --version')
129
+ mut error_limit_flag := ''
130
+ if version_res.exit_code == 0 && version_res.output.contains('clang') {
131
+ error_limit_flag = ' -ferror-limit=0'
132
+ }
133
+ cc_cmd := '${cc} ${cc_flags} -w ${c_file} -o ${output_name}${error_limit_flag}'
134
if os.getenv('V2VERBOSE') != '' {
135
dump(cc_cmd)
136
}
0 commit comments