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

pull/9298/head
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
1 changed files with 5 additions and 0 deletions

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 {