v.builder: fix `v -no-retry-compilation -cc tcc -usecache examples/tetris/`

pull/13000/head
Delyan Angelov 2021-12-29 21:45:01 +02:00
parent 99fdcd2e71
commit 4114dd0815
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 6 additions and 1 deletions

View File

@ -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