1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.builder: add -Wno-write-strings for tcc on -cstrict

This commit is contained in:
Delyan Angelov 2022-09-17 15:37:58 +03:00
parent de636dbb2b
commit afe7166346
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -324,6 +324,10 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
if ccompiler != 'msvc' && v.pref.os != .freebsd {
ccoptions.wargs << '-Werror=implicit-function-declaration'
}
if ccoptions.is_cc_tcc {
// tcc 806b3f98 needs this flag too:
ccoptions.wargs << '-Wno-write-strings'
}
if v.pref.is_liveshared || v.pref.is_livemain {
if (v.pref.os == .linux || os.user_os() == 'linux') && v.pref.build_mode != .build_module {
ccoptions.linker_flags << '-rdynamic'
@ -332,6 +336,7 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
ccoptions.args << '-flat_namespace'
}
}
// macOS code can include objective C TODO remove once objective C is replaced with C
if v.pref.os == .macos || v.pref.os == .ios {
if !ccoptions.is_cc_tcc && !user_darwin_ppc {