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

builder: warn when using tcc with -prod (#9288)

This commit is contained in:
Nick Treleaven 2021-03-14 00:55:14 +00:00 committed by GitHub
parent 9ed9e7aff0
commit df46fe1373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,6 +259,11 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
// }
}
if v.pref.is_prod {
// don't warn for vlib tests
if ccoptions.is_cc_tcc && !(v.parsed_files.len > 0
&& v.parsed_files.last().path.contains('vlib')) {
eprintln('Note: tcc is not recommended for -prod builds')
}
ccoptions.args << optimization_options
}
if v.pref.is_prod && !ccoptions.debug_mode {