From df46fe13739acea60d482ab16811a432ddf76662 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Sun, 14 Mar 2021 00:55:14 +0000 Subject: [PATCH] builder: warn when using tcc with -prod (#9288) --- vlib/v/builder/cc.v | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 771b33363b..1b939614cd 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -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 {