From 090e1a87b7351cc3212c503b0500e1945b2b8a80 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 25 Oct 2019 18:49:49 +0300 Subject: [PATCH] linux: use gcc if tcc fails --- vlib/compiler/cc.v | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vlib/compiler/cc.v b/vlib/compiler/cc.v index 931a30c80d..801bfe811b 100644 --- a/vlib/compiler/cc.v +++ b/vlib/compiler/cc.v @@ -221,6 +221,8 @@ fn (v mut V) cc() { } args := a.join(' ') +start: + 777 // TODO remove cmd := '${v.pref.ccompiler} $args' // Run if v.pref.show_c_cmd || v.pref.is_verbose { @@ -239,6 +241,13 @@ fn (v mut V) cc() { '-----------------------------------------------------------\n' + 'Probably your C compiler is missing. \n' + 'Please reinstall it, or make it available in your PATH.') + // TCC problems on linux? Try gcc + $if linux { + if v.pref.ccompiler == 'tcc' { + v.pref.ccompiler = 'cc' + goto start + } + } } if v.pref.is_debug {