From 4114dd0815f2d81a76f65f72bd5e60e607356717 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 29 Dec 2021 21:45:01 +0200 Subject: [PATCH] v.builder: fix `v -no-retry-compilation -cc tcc -usecache examples/tetris/` --- vlib/v/builder/cc.v | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index afe307c9c6..ade2374616 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -341,7 +341,12 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { ccoptions.post_args << '-municode' } cflags := v.get_os_cflags() - ccoptions.o_args << cflags.c_options_only_object_files() + + if v.pref.build_mode != .build_module { + only_o_files := cflags.c_options_only_object_files() + ccoptions.o_args << only_o_files + } + defines, others, libs := cflags.defines_others_libs() ccoptions.pre_args << defines ccoptions.pre_args << others