From 2391c72e4b9e6dbbe6bbdfbe75a7ba678ab6d887 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 17 Nov 2019 01:14:05 +0300 Subject: [PATCH] tcc: 64 bit by default --- vlib/compiler/cc.v | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/vlib/compiler/cc.v b/vlib/compiler/cc.v index a71566ab59..b8da92e047 100644 --- a/vlib/compiler/cc.v +++ b/vlib/compiler/cc.v @@ -73,6 +73,20 @@ fn (v mut V) cc() { return } } + // arguments for the C compiler + mut a := [v.pref.cflags, '-std=gnu11', + '-Wall', + '-Wextra', + // TODO : activate -Werror once no warnings remain +// '-Werror', + // TODO : try and remove the below workaround options when the corresponding + // warnings are totally fixed/removed + '-Wno-unused-variable', + '-Wno-unused-but-set-variable', + '-Wno-unused-parameter', + '-Wno-unused-result', + '-Wno-missing-braces', + '-Wno-unused-label'] // TCC on Linux by default, unless -cc was provided // TODO if -cc = cc, TCC is still used, default compiler should be // used instead. @@ -95,6 +109,7 @@ fn (v mut V) cc() { //os.mkdir('/var/tmp/tcc/lib/tcc/') //os.create('/var/tmp/tcc/lib/tcc/libtcc1.a') v.pref.ccompiler = tcc_path + a << '-m64' } } } $else { @@ -103,20 +118,6 @@ fn (v mut V) cc() { } //linux_host := os.user_os() == 'linux' v.log('cc() isprod=$v.pref.is_prod outname=$v.out_name') - // arguments for the C compiler - mut a := [v.pref.cflags, '-std=gnu11', - '-Wall', - '-Wextra', - // TODO : activate -Werror once no warnings remain -// '-Werror', - // TODO : try and remove the below workaround options when the corresponding - // warnings are totally fixed/removed - '-Wno-unused-variable', - '-Wno-unused-but-set-variable', - '-Wno-unused-parameter', - '-Wno-unused-result', - '-Wno-missing-braces', - '-Wno-unused-label'] if v.pref.is_so { a << '-shared -fPIC '// -Wl,-z,defs'